chore: add new route
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user