-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
Milestone
Description
At the moment when we call endpoint POST /work-period-payments/query to get the list of Work Periods to create payments for it uses method searchResourceBookings which get data from ES (and only fallback to DB in case of an error).
Instead of this when creating payments we have to get Work Periods from DB, because data from DB is much more reliable.
For this purpose we have to:
- add
options.returnFromDBto the methodsearchResourceBookings. Is this option istruethen we have to get data from DB instead of ES. Otherwise, the current logic should work: get data from ES and in case of error fallback to DB. NOTE:options.returnFromDBwould be only for internal usage, same likeoptions.returnAll - pass this option when searching for WPs inside
createQueryWorkPeriodPayments