aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/job.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-05-05 17:24:16 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-05-05 17:24:16 +0200
commit4e284e97b95d1fe93378b90061272e3abc875078 (patch)
treec5ad3b70046725dc7491b0d0a228bd1f76e4cab4 /server/models/job.js
parente5b885390557dd61d64ca3e0db5f33dd602518f2 (diff)
downloadPeerTube-4e284e97b95d1fe93378b90061272e3abc875078.tar.gz
PeerTube-4e284e97b95d1fe93378b90061272e3abc875078.tar.zst
PeerTube-4e284e97b95d1fe93378b90061272e3abc875078.zip
Server: finish old jobs at startup
Diffstat (limited to 'server/models/job.js')
-rw-r--r--server/models/job.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/job.js b/server/models/job.js
index eeb50e16d..949f88d44 100644
--- a/server/models/job.js
+++ b/server/models/job.js
@@ -39,14 +39,14 @@ module.exports = function (sequelize, DataTypes) {
39 39
40// --------------------------------------------------------------------------- 40// ---------------------------------------------------------------------------
41 41
42function listWithLimit (limit, callback) { 42function listWithLimit (limit, state, callback) {
43 const query = { 43 const query = {
44 order: [ 44 order: [
45 [ 'id', 'ASC' ] 45 [ 'id', 'ASC' ]
46 ], 46 ],
47 limit: limit, 47 limit: limit,
48 where: { 48 where: {
49 state: constants.JOB_STATES.PENDING 49 state
50 } 50 }
51 } 51 }
52 52