Management API and tools
This commit is contained in:
parent
f698249dd8
commit
9b81a6cc8b
15 changed files with 222 additions and 149 deletions
|
|
@ -5,7 +5,7 @@ import { Fernet } from "fernet-nodejs";
|
|||
|
||||
const getNextQueuePlace = async () => {
|
||||
const allActiveJobs = await Job.find({ status: Status.ENQUEUED }).sort({
|
||||
queue_place: "desc",
|
||||
queuePlace: "desc",
|
||||
});
|
||||
if (allActiveJobs.length) {
|
||||
return allActiveJobs[0].queuePlace + 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue