forked from wangziqi/gongxue-base
feat: add public question bank sync worker
This commit is contained in:
@@ -50,6 +50,17 @@ async function runOnce() {
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (job === 'public-banks') {
|
||||
const { closePublicBankSyncExecutorPool, processPublicBankSyncBatch } = await import('./jobs/public-banks.js');
|
||||
extraClosers.add(closePublicBankSyncExecutorPool);
|
||||
const result = await processPublicBankSyncBatch();
|
||||
console.log(
|
||||
`[worker] public-banks batch processed=${result.processed}`
|
||||
+ ` synced=${result.synced} conflicts=${result.conflicts}`
|
||||
+ ` failed=${result.failed} skipped=${result.skipped}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
throw new Error(`Unsupported worker job: ${job}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user