mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Delete completed/failed jobs directly from bullmq
This commit is contained in:
parent
5800f354cc
commit
c3b21b68b5
3 changed files with 61 additions and 9 deletions
|
@ -239,7 +239,23 @@ const REQUEST_TIMEOUTS = {
|
|||
REDUNDANCY: JOB_TTL['video-redundancy']
|
||||
}
|
||||
|
||||
const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
|
||||
const JOB_REMOVAL_OPTIONS = {
|
||||
COUNT: 10000, // Max jobs to store
|
||||
|
||||
SUCCESS: { // Success jobs
|
||||
'DEFAULT': parseDurationToMs('2 days'),
|
||||
|
||||
'activitypub-http-broadcast-parallel': parseDurationToMs('10 minutes'),
|
||||
'activitypub-http-unicast': parseDurationToMs('1 hour'),
|
||||
'videos-views-stats': parseDurationToMs('3 hours'),
|
||||
'activitypub-refresher': parseDurationToMs('10 hours')
|
||||
},
|
||||
|
||||
FAILURE: { // Failed job
|
||||
DEFAULT: parseDurationToMs('7 days')
|
||||
}
|
||||
}
|
||||
|
||||
const VIDEO_IMPORT_TIMEOUT = Math.floor(JOB_TTL['video-import'] * 0.9)
|
||||
|
||||
const SCHEDULER_INTERVALS_MS = {
|
||||
|
@ -938,6 +954,8 @@ if (process.env.PRODUCTION_CONSTANTS !== 'true') {
|
|||
OVERVIEWS.VIDEOS.SAMPLE_THRESHOLD = 2
|
||||
|
||||
PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME = 5000
|
||||
|
||||
JOB_REMOVAL_OPTIONS.SUCCESS['videos-views-stats'] = 10000
|
||||
}
|
||||
|
||||
if (isTestInstance()) {
|
||||
|
@ -1069,7 +1087,7 @@ export {
|
|||
CRAWL_REQUEST_CONCURRENCY,
|
||||
DEFAULT_AUDIO_RESOLUTION,
|
||||
BINARY_CONTENT_TYPES,
|
||||
JOB_COMPLETED_LIFETIME,
|
||||
JOB_REMOVAL_OPTIONS,
|
||||
HTTP_SIGNATURE,
|
||||
VIDEO_IMPORT_STATES,
|
||||
VIDEO_CHANNEL_SYNC_STATE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue