chore: add bulk operation

This commit is contained in:
mahyargdz
2025-07-12 15:59:47 +03:30
parent 7a0c337cda
commit b01d77e36e
5 changed files with 198 additions and 4 deletions
@@ -25,10 +25,9 @@ export class QuotaSyncService {
) {}
/**
* Sync quota usage every 15 minutes
* Sync quota usage every 2 hours
*/
@Cron(CronExpression.EVERY_10_SECONDS)
// @Cron("0 */15 * * * *")
@Cron(CronExpression.EVERY_2_HOURS)
async syncAllUsersQuota(): Promise<void> {
const em = this.em.fork();
this.logger.log("Starting quota synchronization for all users");
@@ -67,7 +66,7 @@ export class QuotaSyncService {
/**
* Sync business quota usage every 4 hours
*/
@Cron(CronExpression.EVERY_10_SECONDS)
@Cron(CronExpression.EVERY_4_HOURS)
async syncAllBusinessQuotas(): Promise<void> {
const em = this.em.fork();
this.logger.log("Starting business quota synchronization");