fix: add type assertions to suppress errors

This commit is contained in:
alikia2x (寒寒) 2025-03-22 23:49:48 +08:00
parent e38dc96275
commit b201bfd64d
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
import { Job, Worker } from "bullmq";
import { ConnectionOptions, Job, Worker } from "bullmq";
import { redis } from "lib/db/redis.ts";
import logger from "lib/log/logger.ts";
import { classifyVideosWorker, classifyVideoWorker } from "lib/mq/exec/classifyVideo.ts";
@ -32,7 +32,7 @@ const filterWorker = new Worker(
break;
}
},
{ connection: redis, concurrency: 2, removeOnComplete: { count: 1000 } },
{ connection: redis as ConnectionOptions, concurrency: 2, removeOnComplete: { count: 1000 } },
);
filterWorker.on("active", () => {

View File

@ -1,4 +1,4 @@
import { Job, Worker } from "bullmq";
import { ConnectionOptions, Job, Worker } from "bullmq";
import { collectSongsWorker, getLatestVideosWorker } from "lib/mq/executors.ts";
import { redis } from "lib/db/redis.ts";
import logger from "lib/log/logger.ts";
@ -40,7 +40,7 @@ const latestVideoWorker = new Worker(
break;
}
},
{ connection: redis, concurrency: 6, removeOnComplete: { count: 1440 }, removeOnFail: { count: 0 } },
{ connection: redis as ConnectionOptions, concurrency: 6, removeOnComplete: { count: 1440 }, removeOnFail: { count: 0 } },
);
latestVideoWorker.on("active", () => {
@ -73,7 +73,7 @@ const snapshotWorker = new Worker(
break;
}
},
{ connection: redis, concurrency: 10, removeOnComplete: { count: 2000 } },
{ connection: redis as ConnectionOptions, concurrency: 10, removeOnComplete: { count: 2000 } },
);
snapshotWorker.on("error", (err) => {