]>
Commit | Line | Data |
---|---|---|
60650c77 C |
1 | import { logger } from '../../helpers/logger' |
2 | import { ActorFollowModel } from '../../models/activitypub/actor-follow' | |
3 | import { AbstractScheduler } from './abstract-scheduler' | |
4 | ||
5 | export class BadActorFollowScheduler extends AbstractScheduler { | |
6 | ||
7 | private static instance: AbstractScheduler | |
8 | ||
9 | private constructor () { | |
10 | super() | |
11 | } | |
12 | ||
13 | async execute () { | |
14 | try { | |
15 | await ActorFollowModel.removeBadActorFollows() | |
16 | } catch (err) { | |
17 | logger.error('Error in bad actor follows scheduler.', err) | |
18 | } | |
19 | } | |
20 | ||
21 | static get Instance () { | |
22 | return this.instance || (this.instance = new this()) | |
23 | } | |
24 | } |