Management API and tools

This commit is contained in:
oitsjustjose 2023-04-24 19:38:35 -05:00
commit 9b81a6cc8b
15 changed files with 222 additions and 149 deletions

View file

@ -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;