diff options
author | Chocobozzz <me@florianbigard.com> | 2021-01-21 16:57:21 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-01-25 14:38:52 +0100 |
commit | 77d7e851dccf17dcc89e8fcc2db3f655d1e63f95 (patch) | |
tree | d09e045dfabe7ab1e170d1b0caa9decda8a7d39c /server/controllers/api/jobs.ts | |
parent | 92c871b40554d5285232eb4392cebb63d127704a (diff) | |
download | PeerTube-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/controllers/api/jobs.ts')
-rw-r--r-- | server/controllers/api/jobs.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/controllers/api/jobs.ts b/server/controllers/api/jobs.ts index 929140140..861cc22b9 100644 --- a/server/controllers/api/jobs.ts +++ b/server/controllers/api/jobs.ts | |||
@@ -69,6 +69,7 @@ async function formatJob (job: any, state?: JobState): Promise<Job> { | |||
69 | type: job.queue.name as JobType, | 69 | type: job.queue.name as JobType, |
70 | data: job.data, | 70 | data: job.data, |
71 | progress: await job.progress(), | 71 | progress: await job.progress(), |
72 | priority: job.opts.priority, | ||
72 | error, | 73 | error, |
73 | createdAt: new Date(job.timestamp), | 74 | createdAt: new Date(job.timestamp), |
74 | finishedOn: new Date(job.finishedOn), | 75 | finishedOn: new Date(job.finishedOn), |