Browse Source

Clean up

pull/2981/head
Thomas Kaul 2 years ago
parent
commit
5f7af06dc8
  1. 8
      apps/api/src/services/cron.service.ts

8
apps/api/src/services/cron.service.ts

@ -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(

Loading…
Cancel
Save