Curse-To-Modrinth-Migrator/backend/src/app/controllers/mgmt/resumable.ts
2023-04-24 19:38:35 -05:00

12 lines
389 B
TypeScript

/* 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);
};