|
@ -25,9 +25,7 @@ export class CronService { |
|
|
|
|
|
|
|
|
@Cron(CronExpression.EVERY_HOUR) |
|
|
@Cron(CronExpression.EVERY_HOUR) |
|
|
public async runEveryHour() { |
|
|
public async runEveryHour() { |
|
|
const isDataGatheringEnabled = await this.isDataGatheringEnabled(); |
|
|
if (await this.isDataGatheringEnabled()) { |
|
|
|
|
|
|
|
|
if (isDataGatheringEnabled) { |
|
|
|
|
|
await this.dataGatheringService.gather7Days(); |
|
|
await this.dataGatheringService.gather7Days(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -44,9 +42,7 @@ export class CronService { |
|
|
|
|
|
|
|
|
@Cron(CronService.EVERY_SUNDAY_AT_LUNCH_TIME) |
|
|
@Cron(CronService.EVERY_SUNDAY_AT_LUNCH_TIME) |
|
|
public async runEverySundayAtTwelvePm() { |
|
|
public async runEverySundayAtTwelvePm() { |
|
|
const isDataGatheringEnabled = await this.isDataGatheringEnabled(); |
|
|
if (await this.isDataGatheringEnabled()) { |
|
|
|
|
|
|
|
|
if (isDataGatheringEnabled) { |
|
|
|
|
|
const uniqueAssets = await this.dataGatheringService.getUniqueAssets(); |
|
|
const uniqueAssets = await this.dataGatheringService.getUniqueAssets(); |
|
|
|
|
|
|
|
|
await this.dataGatheringService.addJobsToQueue( |
|
|
await this.dataGatheringService.addJobsToQueue( |
|
|