fix(events): refresh saved payout calendars once per hourly pass (WealthLedger/backend#53) (#157)
Backend verify / commits (push) Skipped
Backend verify / security (push) Successful in 1m6s
Backend verify / verify (push) Failing after 6m50s

This commit was merged in pull request #157.
This commit is contained in:
2026-11-02 23:06:14 +03:00
parent 169bee1da5
commit aeb4647fda
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' });