aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-26 16:26:27 +0100
committerChocobozzz <me@florianbigard.com>2021-03-03 10:08:08 +0100
commit74d249bc1346c7cfaac7ee49bebbebcf2a01f82a (patch)
treed47bd163ae57ed8f15b445296634cc04f4f67b6f /shared/extra-utils/server
parent095e2258043fcff8a79ab082d11edfbd8f13a8e2 (diff)
downloadPeerTube-74d249bc1346c7cfaac7ee49bebbebcf2a01f82a.tar.gz
PeerTube-74d249bc1346c7cfaac7ee49bebbebcf2a01f82a.tar.zst
PeerTube-74d249bc1346c7cfaac7ee49bebbebcf2a01f82a.zip
Add ability to cleanup remote AP interactions
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r--shared/extra-utils/server/jobs.ts3
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