diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/job-queue/handlers/video-live-ending.ts | 2 | ||||
-rw-r--r-- | server/lib/schedulers/remove-old-jobs-scheduler.ts | 28 |
2 files changed, 1 insertions, 29 deletions
diff --git a/server/lib/job-queue/handlers/video-live-ending.ts b/server/lib/job-queue/handlers/video-live-ending.ts index 982280b55..070d1d7a2 100644 --- a/server/lib/job-queue/handlers/video-live-ending.ts +++ b/server/lib/job-queue/handlers/video-live-ending.ts | |||
@@ -189,7 +189,7 @@ async function replaceLiveByReplay (options: { | |||
189 | 189 | ||
190 | await assignReplayFilesToVideo({ video: videoWithFiles, replayDirectory }) | 190 | await assignReplayFilesToVideo({ video: videoWithFiles, replayDirectory }) |
191 | 191 | ||
192 | // FIXME: should not happen in this function | 192 | // Should not happen in this function, but we keep the code if in the future we can replace the permanent live by a replay |
193 | if (permanentLive) { // Remove session replay | 193 | if (permanentLive) { // Remove session replay |
194 | await remove(replayDirectory) | 194 | await remove(replayDirectory) |
195 | } else { // We won't stream again in this live, we can delete the base replay directory | 195 | } else { // We won't stream again in this live, we can delete the base replay directory |
diff --git a/server/lib/schedulers/remove-old-jobs-scheduler.ts b/server/lib/schedulers/remove-old-jobs-scheduler.ts deleted file mode 100644 index 6b05ea144..000000000 --- a/server/lib/schedulers/remove-old-jobs-scheduler.ts +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | import { isTestOrDevInstance } from '../../helpers/core-utils' | ||
2 | import { logger } from '../../helpers/logger' | ||
3 | import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' | ||
4 | import { JobQueue } from '../job-queue' | ||
5 | import { AbstractScheduler } from './abstract-scheduler' | ||
6 | |||
7 | // FIXME: delete this scheduler in a few versions (introduced in 5.0) | ||
8 | // We introduced job removal directly using bullmq option but we still need to delete old jobs | ||
9 | export class RemoveOldJobsScheduler extends AbstractScheduler { | ||
10 | |||
11 | private static instance: AbstractScheduler | ||
12 | |||
13 | protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.REMOVE_OLD_JOBS | ||
14 | |||
15 | private constructor () { | ||
16 | super() | ||
17 | } | ||
18 | |||
19 | protected internalExecute () { | ||
20 | if (!isTestOrDevInstance()) logger.info('Removing old jobs in scheduler.') | ||
21 | |||
22 | return JobQueue.Instance.removeOldJobs() | ||
23 | } | ||
24 | |||
25 | static get Instance () { | ||
26 | return this.instance || (this.instance = new this()) | ||
27 | } | ||
28 | } | ||