aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-01-21 16:57:21 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-01-25 14:38:52 +0100
commit77d7e851dccf17dcc89e8fcc2db3f655d1e63f95 (patch)
treed09e045dfabe7ab1e170d1b0caa9decda8a7d39c /server/initializers/constants.ts
parent92c871b40554d5285232eb4392cebb63d127704a (diff)
downloadPeerTube-77d7e851dccf17dcc89e8fcc2db3f655d1e63f95.tar.gz
PeerTube-77d7e851dccf17dcc89e8fcc2db3f655d1e63f95.tar.zst
PeerTube-77d7e851dccf17dcc89e8fcc2db3f655d1e63f95.zip
Add priority to transcoding jobs
(1 = highest priority) 100 for new resolutions 10 for original file optimization Add a malus for transcoding jobs depending on how many uploads the user did in the last 7 days
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 182bdf9cc..453ca02ed 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -179,6 +179,12 @@ const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } =
179 cron: randomInt(1, 20) + ' * * * *' // Between 1-20 minutes past the hour 179 cron: randomInt(1, 20) + ' * * * *' // Between 1-20 minutes past the hour
180 } 180 }
181} 181}
182const JOB_PRIORITY = {
183 TRANSCODING: {
184 OPTIMIZER: 10,
185 NEW_RESOLUTION: 100
186 }
187}
182 188
183const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job 189const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job
184const CRAWL_REQUEST_CONCURRENCY = 1 // How many requests in parallel to fetch remote data (likes, shares...) 190const CRAWL_REQUEST_CONCURRENCY = 1 // How many requests in parallel to fetch remote data (likes, shares...)
@@ -851,6 +857,7 @@ export {
851 VIDEO_STATES, 857 VIDEO_STATES,
852 QUEUE_CONCURRENCY, 858 QUEUE_CONCURRENCY,
853 VIDEO_RATE_TYPES, 859 VIDEO_RATE_TYPES,
860 JOB_PRIORITY,
854 VIDEO_TRANSCODING_FPS, 861 VIDEO_TRANSCODING_FPS,
855 FFMPEG_NICE, 862 FFMPEG_NICE,
856 ABUSE_STATES, 863 ABUSE_STATES,