update: logging in bulk
This commit is contained in:
parent
c12379134c
commit
cd160c486e
@ -259,15 +259,15 @@ export const takeBulkSnapshotForVideosWorker = async (job: Job) => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof NetSchedulerError && e.code === "NO_PROXY_AVAILABLE") {
|
if (e instanceof NetSchedulerError && e.code === "NO_PROXY_AVAILABLE") {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`No available proxy for aid ${job.data.aid}.`,
|
`No available proxy for bulk request now.`,
|
||||||
"mq",
|
"mq",
|
||||||
"fn:takeSnapshotForVideoWorker",
|
"fn:takeBulkSnapshotForVideosWorker",
|
||||||
);
|
);
|
||||||
await bulkSetSnapshotStatus(client, ids, "completed");
|
await bulkSetSnapshotStatus(client, ids, "completed");
|
||||||
await bulkScheduleSnapshot(client, aidsToFetch, "normal", Date.now() + 2 * MINUTE);
|
await bulkScheduleSnapshot(client, aidsToFetch, "normal", Date.now() + 2 * MINUTE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logger.error(e as Error, "mq", "fn:takeSnapshotForVideoWorker");
|
logger.error(e as Error, "mq", "fn:takeBulkSnapshotForVideosWorker");
|
||||||
await bulkSetSnapshotStatus(client, ids, "failed");
|
await bulkSetSnapshotStatus(client, ids, "failed");
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
Loading…
Reference in New Issue
Block a user