fix(events): refresh saved payout calendars once per hourly pass (WealthLedger/backend#53)
Backend verify / commits (pull_request) Successful in 1m25s
Backend verify / security (pull_request) Successful in 1m2s
Backend verify / verify (pull_request) Successful in 6m1s

This commit is contained in:
2026-11-02 22:54:22 +03:00
parent 169bee1da5
commit d3106a5366
4 changed files with 131 additions and 2 deletions
@@ -268,6 +268,7 @@ export class TbankHourlyScheduler implements OnModuleDestroy, OnModuleInit {
account.accountId,
dispatch,
dispatchProblems,
walkStartedAt,
);
}
}
@@ -340,9 +341,12 @@ export class TbankHourlyScheduler implements OnModuleDestroy, OnModuleInit {
accountId: string,
dispatch: DispatchStep,
dispatchProblems: HourlySection[],
walkStartedAt: Date,
) {
try {
const ids = await this.withBound(this.events.refresh(userId, accountId));
const ids = await this.withBound(
this.events.refresh(userId, accountId, {}, walkStartedAt),
);
if (ids !== BOUND_EXPIRED) {
for (const id of ids) {
await dispatch({ accountId, id, section: 'events' });