fix: incorrect return from snapshotTickWorker

This commit is contained in:
alikia2x (寒寒) 2025-04-07 00:36:44 +08:00
parent c4c9a3a440
commit d98e24b62f
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -75,7 +75,7 @@ export const snapshotTickWorker = async (_job: Job) => {
const schedules = await getSnapshotsInNextSecond(client); const schedules = await getSnapshotsInNextSecond(client);
for (const schedule of schedules) { for (const schedule of schedules) {
if (await videoHasProcessingSchedule(client, Number(schedule.aid))) { if (await videoHasProcessingSchedule(client, Number(schedule.aid))) {
return `ALREADY_PROCESSING`; continue;
} }
let priority = 3; let priority = 3;
if (schedule.type && priorityMap[schedule.type]) { if (schedule.type && priorityMap[schedule.type]) {
@ -88,8 +88,8 @@ export const snapshotTickWorker = async (_job: Job) => {
id: Number(schedule.id), id: Number(schedule.id),
type: schedule.type ?? "normal", type: schedule.type ?? "normal",
}, { priority }); }, { priority });
return `OK`;
} }
return `OK`;
} catch (e) { } catch (e) {
logger.error(e as Error); logger.error(e as Error);
} finally { } finally {