This commit is contained in:
Alex Holliday committed 2026-03-20 11:43:37 -07:00
1 parent 6fb7ad63f6
commit 0495bef469
2 files changed
+12 -4

No files matched your search

+8 -1
View File
@@ -3,7 +3,14 @@ import { Request, Response, NextFunction } from "express";
const SERVICE_NAME = "JobQueueController";
class JobQueueController {
export interface IJobQueueController {
getMetrics(req: Request, res: Response, next: NextFunction): Promise<void>;
getJobs(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
getAllMetrics(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
flushQueue(req: Request, res: Response, next: NextFunction): Promise<Response | void>;
}
class JobQueueController implements IJobQueueController {
static SERVICE_NAME = SERVICE_NAME;
private jobQueue: ISuperSimpleQueue;
constructor(jobQueue: ISuperSimpleQueue) {
+4 -3
View File
@@ -1,10 +1,11 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import { isAllowed } from "@/middleware/isAllowed.js";
import { IJobQueueController } from "@/controllers/queueController.js";
class QueueRoutes {
private router: Router;
private queueController: any;
private queueController: IJobQueueController;
constructor(queueController: any) {
constructor(queueController: IJobQueueController) {
this.router = Router();
this.queueController = queueController;
this.initRoutes();