Skip to content

Commit c903627

Browse files
committed
fix build
1 parent f8c91ca commit c903627

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/server/routes/admin.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Queue } from "bullmq";
1+
import { Queue, JobType } from "bullmq";
22
import * as express from "express";
33
import AnonymousError from "../../core/AnonymousError";
44
import AnonymizedRepositoryModel from "../../core/model/anonymizedRepositories/anonymizedRepositories.model";
@@ -171,9 +171,10 @@ router.post("/queue/:name/drain", async (req, res) => {
171171
router.get("/queues", async (req, res) => {
172172
const search = req.query.search ? String(req.query.search).toLowerCase() : "";
173173
const stateFilter = req.query.state ? String(req.query.state) : null;
174-
const states = stateFilter && (QUEUE_STATES as readonly string[]).includes(stateFilter)
175-
? [stateFilter]
176-
: (QUEUE_STATES as readonly string[]);
174+
const states: JobType[] =
175+
stateFilter && (QUEUE_STATES as readonly string[]).includes(stateFilter)
176+
? [stateFilter as JobType]
177+
: ([...QUEUE_STATES] as JobType[]);
177178

178179
const [download, remove, cache, dCounts, rCounts, cCounts] = await Promise.all([
179180
downloadQueue.getJobs(states),

0 commit comments

Comments
 (0)