Management API and tools
This commit is contained in:
parent
f698249dd8
commit
9b81a6cc8b
15 changed files with 222 additions and 149 deletions
12
backend/src/app/controllers/mgmt/resumable.ts
Normal file
12
backend/src/app/controllers/mgmt/resumable.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/* Gets any jobs that were Processing when the processing node restarted */
|
||||
import { Request, Response } from "express";
|
||||
import Jobs from "../../models/Job";
|
||||
import Status from "../../status";
|
||||
|
||||
export default async (req: Request, res: Response) => {
|
||||
const jobs = await Jobs.find({ status: Status.PROCESSING }).sort({
|
||||
queuePlace: "asc",
|
||||
});
|
||||
|
||||
return res.status(200).json(jobs);
|
||||
};
|
||||
Loading…
Reference in a new issue