From 9452d4fd3321148fb80b64a67bd9983fee6c208e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Jul 2022 15:44:14 +0200 Subject: /!\ Use a dedicated config file for development It means you have to replace NODE_ENV=test to NODE_ENV=dev if you use it npm run dev:* commands are already updated --- server/lib/schedulers/actor-follow-scheduler.ts | 4 ++-- server/lib/schedulers/remove-old-jobs-scheduler.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib/schedulers') diff --git a/server/lib/schedulers/actor-follow-scheduler.ts b/server/lib/schedulers/actor-follow-scheduler.ts index 560f97f3e..e1c56c135 100644 --- a/server/lib/schedulers/actor-follow-scheduler.ts +++ b/server/lib/schedulers/actor-follow-scheduler.ts @@ -1,4 +1,4 @@ -import { isTestInstance } from '../../helpers/core-utils' +import { isTestOrDevInstance } from '../../helpers/core-utils' import { logger } from '../../helpers/logger' import { ACTOR_FOLLOW_SCORE, SCHEDULER_INTERVALS_MS } from '../../initializers/constants' import { ActorFollowModel } from '../../models/actor/actor-follow' @@ -39,7 +39,7 @@ export class ActorFollowScheduler extends AbstractScheduler { } private async removeBadActorFollows () { - if (!isTestInstance()) logger.info('Removing bad actor follows (scheduler).') + if (!isTestOrDevInstance()) logger.info('Removing bad actor follows (scheduler).') try { await ActorFollowModel.removeBadActorFollows() diff --git a/server/lib/schedulers/remove-old-jobs-scheduler.ts b/server/lib/schedulers/remove-old-jobs-scheduler.ts index dffef3542..879846999 100644 --- a/server/lib/schedulers/remove-old-jobs-scheduler.ts +++ b/server/lib/schedulers/remove-old-jobs-scheduler.ts @@ -1,8 +1,8 @@ -import { isTestInstance } from '../../helpers/core-utils' +import { isTestOrDevInstance } from '../../helpers/core-utils' import { logger } from '../../helpers/logger' +import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' import { JobQueue } from '../job-queue' import { AbstractScheduler } from './abstract-scheduler' -import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' export class RemoveOldJobsScheduler extends AbstractScheduler { @@ -15,7 +15,7 @@ export class RemoveOldJobsScheduler extends AbstractScheduler { } protected internalExecute () { - if (!isTestInstance()) logger.info('Removing old jobs in scheduler.') + if (!isTestOrDevInstance()) logger.info('Removing old jobs in scheduler.') return JobQueue.Instance.removeOldJobs() } -- cgit v1.2.3