From ea99d15fe87d03568f4b5077e1ce37c742c9fa33 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 27 Feb 2018 11:08:59 +0100 Subject: [PATCH] Add logs for scheduler --- server/lib/schedulers/bad-actor-follow-scheduler.ts | 2 ++ server/lib/schedulers/remove-old-jobs-scheduler.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/server/lib/schedulers/bad-actor-follow-scheduler.ts b/server/lib/schedulers/bad-actor-follow-scheduler.ts index c6c285ece..397eb470e 100644 --- a/server/lib/schedulers/bad-actor-follow-scheduler.ts +++ b/server/lib/schedulers/bad-actor-follow-scheduler.ts @@ -11,6 +11,8 @@ export class BadActorFollowScheduler extends AbstractScheduler { } async execute () { + logger.info('Removing bad actor follows (scheduler).') + try { await ActorFollowModel.removeBadActorFollows() } catch (err) { diff --git a/server/lib/schedulers/remove-old-jobs-scheduler.ts b/server/lib/schedulers/remove-old-jobs-scheduler.ts index add5677ac..51fcf711e 100644 --- a/server/lib/schedulers/remove-old-jobs-scheduler.ts +++ b/server/lib/schedulers/remove-old-jobs-scheduler.ts @@ -1,3 +1,4 @@ +import { logger } from '../../helpers/logger' import { JobQueue } from '../job-queue' import { AbstractScheduler } from './abstract-scheduler' @@ -10,6 +11,8 @@ export class RemoveOldJobsScheduler extends AbstractScheduler { } async execute () { + logger.info('Removing old jobs (scheduler).') + JobQueue.Instance.removeOldJobs() } -- 2.25.1