diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-27 11:08:59 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-27 11:08:59 +0100 |
commit | ea99d15fe87d03568f4b5077e1ce37c742c9fa33 (patch) | |
tree | 6879e532ab243944b7d088feccb58b2b16e56b2c /server/lib/schedulers | |
parent | 0a8ae68459ecfd388bdd17cb23dd3c9c1b148e6c (diff) | |
download | PeerTube-ea99d15fe87d03568f4b5077e1ce37c742c9fa33.tar.gz PeerTube-ea99d15fe87d03568f4b5077e1ce37c742c9fa33.tar.zst PeerTube-ea99d15fe87d03568f4b5077e1ce37c742c9fa33.zip |
Add logs for scheduler
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r-- | server/lib/schedulers/bad-actor-follow-scheduler.ts | 2 | ||||
-rw-r--r-- | server/lib/schedulers/remove-old-jobs-scheduler.ts | 3 |
2 files changed, 5 insertions, 0 deletions
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 { | |||
11 | } | 11 | } |
12 | 12 | ||
13 | async execute () { | 13 | async execute () { |
14 | logger.info('Removing bad actor follows (scheduler).') | ||
15 | |||
14 | try { | 16 | try { |
15 | await ActorFollowModel.removeBadActorFollows() | 17 | await ActorFollowModel.removeBadActorFollows() |
16 | } catch (err) { | 18 | } 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 @@ | |||
1 | import { logger } from '../../helpers/logger' | ||
1 | import { JobQueue } from '../job-queue' | 2 | import { JobQueue } from '../job-queue' |
2 | import { AbstractScheduler } from './abstract-scheduler' | 3 | import { AbstractScheduler } from './abstract-scheduler' |
3 | 4 | ||
@@ -10,6 +11,8 @@ export class RemoveOldJobsScheduler extends AbstractScheduler { | |||
10 | } | 11 | } |
11 | 12 | ||
12 | async execute () { | 13 | async execute () { |
14 | logger.info('Removing old jobs (scheduler).') | ||
15 | |||
13 | JobQueue.Instance.removeOldJobs() | 16 | JobQueue.Instance.removeOldJobs() |
14 | } | 17 | } |
15 | 18 | ||