diff --git a/NEWS.md b/NEWS.md index 2c2c14ec..665308b6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,7 +4,7 @@ New features: * Batch queries are handled per db host. - There is an scheduler controlling how many queries and in what order they are run. - - Priority is based on: # of queries already run, last execution time, and oldest user in queue. + - Priority is based on: number of queries already ran, and oldest user in queue. * Batch queries capacity: allow to configure how many jobs to run per db host. diff --git a/batch/scheduler/scheduler.js b/batch/scheduler/scheduler.js index a05ac1ca..7ee10560 100644 --- a/batch/scheduler/scheduler.js +++ b/batch/scheduler/scheduler.js @@ -31,11 +31,6 @@ function Scheduler(capacity, taskRunner) { return taskEntityA.jobs - taskEntityB.jobs; } - // priority for entity with oldest executed job - if (taskEntityA.runAt !== taskEntityB.runAt) { - return taskEntityA.runAt - taskEntityB.runAt; - } - // priority for oldest job if (taskEntityA.createdAt !== taskEntityB.createdAt) { return taskEntityA.createdAt - taskEntityB.createdAt;