fix: incorrect return from snapshotTickWorker
This commit is contained in:
parent
c4c9a3a440
commit
d98e24b62f
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user