aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-09 09:08:22 +0200
committerChocobozzz <me@florianbigard.com>2018-05-09 09:08:22 +0200
commit71e3dfda4e2bcc228415c0d66b09a84bb73dddd1 (patch)
treef7b17a3f01b5e796b73debcd3f11fa0bb56f18bb /server/initializers/constants.ts
parent7797350a0e539b872bdcb59aa07fa9b16cb2db7a (diff)
downloadPeerTube-71e3dfda4e2bcc228415c0d66b09a84bb73dddd1.tar.gz
PeerTube-71e3dfda4e2bcc228415c0d66b09a84bb73dddd1.tar.zst
PeerTube-71e3dfda4e2bcc228415c0d66b09a84bb73dddd1.zip
Add timeout and TTL to request jobs
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 365b8617d..6556aa168 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -78,9 +78,10 @@ const JOB_CONCURRENCY: { [ id in JobType ]: number } = {
78 'video-file': 1, 78 'video-file': 1,
79 'email': 5 79 'email': 5
80} 80}
81const BROADCAST_CONCURRENCY = 5 // How many requests in parallel we do in activitypub-http-broadcast job 81const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job
82// 2 days 82const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds
83const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 83const JOB_REQUEST_TTL = 60000 * 10 // 10 minutes
84const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
84 85
85// 1 hour 86// 1 hour
86let SCHEDULER_INTERVAL = 60000 * 60 87let SCHEDULER_INTERVAL = 60000 * 60
@@ -466,6 +467,8 @@ export {
466 VIDEO_RATE_TYPES, 467 VIDEO_RATE_TYPES,
467 VIDEO_MIMETYPE_EXT, 468 VIDEO_MIMETYPE_EXT,
468 VIDEO_TRANSCODING_FPS, 469 VIDEO_TRANSCODING_FPS,
470 JOB_REQUEST_TIMEOUT,
471 JOB_REQUEST_TTL,
469 USER_PASSWORD_RESET_LIFETIME, 472 USER_PASSWORD_RESET_LIFETIME,
470 IMAGE_MIMETYPE_EXT, 473 IMAGE_MIMETYPE_EXT,
471 SCHEDULER_INTERVAL, 474 SCHEDULER_INTERVAL,