aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-03 10:19:51 +0200
committerChocobozzz <me@florianbigard.com>2018-08-06 11:19:16 +0200
commit2b86fe727490fc0e42c0d147d98c0df612d5507c (patch)
tree6bd162c0908e7c55bc686f7f3ea996b52afbe631 /server/initializers/constants.ts
parent516df59b3bbb0218afeda595ee4966800bff4519 (diff)
downloadPeerTube-2b86fe727490fc0e42c0d147d98c0df612d5507c.tar.gz
PeerTube-2b86fe727490fc0e42c0d147d98c0df612d5507c.tar.zst
PeerTube-2b86fe727490fc0e42c0d147d98c0df612d5507c.zip
Add job ttl
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index feb45e4d0..5bfeb3746 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -100,9 +100,18 @@ const JOB_CONCURRENCY: { [ id in JobType ]: number } = {
100 'video-import': 1, 100 'video-import': 1,
101 'email': 5 101 'email': 5
102} 102}
103const JOB_TTL: { [ id in JobType ]: number } = {
104 'activitypub-http-broadcast': 60000 * 10, // 10 minutes
105 'activitypub-http-unicast': 60000 * 10, // 10 minutes
106 'activitypub-http-fetcher': 60000 * 10, // 10 minutes
107 'activitypub-follow': 60000 * 10, // 10 minutes
108 'video-file-import': 1000 * 3600, // 1 hour
109 'video-file': 1000 * 3600 * 48, // 2 days, transcoding could be long
110 'video-import': 1000 * 3600 * 5, // 5 hours
111 'email': 60000 * 10 // 10 minutes
112}
103const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job 113const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job
104const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds 114const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds
105const JOB_REQUEST_TTL = 60000 * 10 // 10 minutes
106const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days 115const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
107 116
108// 1 hour 117// 1 hour
@@ -576,6 +585,7 @@ export {
576 ROUTE_CACHE_LIFETIME, 585 ROUTE_CACHE_LIFETIME,
577 SORTABLE_COLUMNS, 586 SORTABLE_COLUMNS,
578 FEEDS, 587 FEEDS,
588 JOB_TTL,
579 NSFW_POLICY_TYPES, 589 NSFW_POLICY_TYPES,
580 STATIC_MAX_AGE, 590 STATIC_MAX_AGE,
581 STATIC_PATHS, 591 STATIC_PATHS,
@@ -592,7 +602,6 @@ export {
592 VIDEO_TRANSCODING_FPS, 602 VIDEO_TRANSCODING_FPS,
593 FFMPEG_NICE, 603 FFMPEG_NICE,
594 JOB_REQUEST_TIMEOUT, 604 JOB_REQUEST_TIMEOUT,
595 JOB_REQUEST_TTL,
596 USER_PASSWORD_RESET_LIFETIME, 605 USER_PASSWORD_RESET_LIFETIME,
597 IMAGE_MIMETYPE_EXT, 606 IMAGE_MIMETYPE_EXT,
598 SCHEDULER_INTERVALS_MS, 607 SCHEDULER_INTERVALS_MS,