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

Loading…
Cancel
Save