diff options
Diffstat (limited to 'shared/extra-utils/server/jobs.ts')
-rw-r--r-- | shared/extra-utils/server/jobs.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts index 97971f960..704929bd4 100644 --- a/shared/extra-utils/server/jobs.ts +++ b/shared/extra-utils/server/jobs.ts | |||
@@ -63,6 +63,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) { | |||
63 | else servers = serversArg as ServerInfo[] | 63 | else servers = serversArg as ServerInfo[] |
64 | 64 | ||
65 | const states: JobState[] = [ 'waiting', 'active', 'delayed' ] | 65 | const states: JobState[] = [ 'waiting', 'active', 'delayed' ] |
66 | const repeatableJobs = [ 'videos-views', 'activitypub-cleaner' ] | ||
66 | let pendingRequests: boolean | 67 | let pendingRequests: boolean |
67 | 68 | ||
68 | function tasksBuilder () { | 69 | function tasksBuilder () { |
@@ -79,7 +80,7 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) { | |||
79 | count: 10, | 80 | count: 10, |
80 | sort: '-createdAt' | 81 | sort: '-createdAt' |
81 | }).then(res => res.body.data) | 82 | }).then(res => res.body.data) |
82 | .then((jobs: Job[]) => jobs.filter(j => j.type !== 'videos-views')) | 83 | .then((jobs: Job[]) => jobs.filter(j => !repeatableJobs.includes(j.type))) |
83 | .then(jobs => { | 84 | .then(jobs => { |
84 | if (jobs.length !== 0) { | 85 | if (jobs.length !== 0) { |
85 | pendingRequests = true | 86 | pendingRequests = true |