chore: add new route

This commit is contained in:
mahyargdz
2025-07-20 10:15:13 +03:30
parent 066d6c8598
commit 5322b6b6c4
48 changed files with 1282 additions and 295 deletions
@@ -23,9 +23,9 @@ export class QuotaSyncService {
private readonly logger = new Logger(QuotaSyncService.name);
constructor(
@InjectQueue(QUOTA_SYNC_QUEUE.QUEUE_NAME) private readonly quotaSyncQueue: Queue,
private readonly wildDuckUsersService: WildDuckUsersService,
private readonly em: EntityManager,
@InjectQueue(QUOTA_SYNC_QUEUE.QUEUE_NAME) private readonly quotaSyncQueue: Queue,
) {}
/**
@@ -50,7 +50,7 @@ export class QuotaSyncService {
delay: 2000,
},
repeat: {
pattern: "0/1 * * * *", // Every hour at minute 0 (cron pattern)
pattern: "0 * * * *",
},
},
);
@@ -80,6 +80,9 @@ export class QuotaSyncService {
} else {
this.logger.debug("No existing cron job found to remove");
}
await this.quotaSyncQueue.clean(0, 100, "completed");
await this.quotaSyncQueue.clean(0, 100, "failed");
} catch (error) {
this.logger.error("Failed to remove quota sync cron job", error);
}