diff --git a/src/modules/admin-costs/cost-aggregation.service.ts b/src/modules/admin-costs/cost-aggregation.service.ts index 7e1fa19..b776609 100644 --- a/src/modules/admin-costs/cost-aggregation.service.ts +++ b/src/modules/admin-costs/cost-aggregation.service.ts @@ -16,7 +16,7 @@ export class CostAggregationService implements OnModuleInit, OnModuleDestroy { } catch (err: any) { this.logger.warn(`Initial cost aggregation failed: ${err.message}`); } - this.timer = setInterval(() => this.aggregateToday(), AGGREGATE_INTERVAL_MS); + this.timer = setInterval(() => this.aggregateToday().catch(err => this.logger.warn(`Hourly cost aggregation failed: ${err.message}`)), AGGREGATE_INTERVAL_MS); } onModuleDestroy() {