Chore: dispatch write to workers

This commit is contained in:
SukkaW
2026-08-02 00:09:56 +08:00
parent 6d8070d5f3
commit fa9c02d27d
9 changed files with 528 additions and 199 deletions

View File

@@ -28,6 +28,7 @@ import path from 'node:path';
import { ROOT_DIR } from './constants/dir';
import { isCI } from 'ci-info';
import { printExternalDownloadStats } from './lib/download-stats';
import { endOutputWorkerFarm } from './lib/rules/output-worker-farm';
process.on('uncaughtException', (error) => {
console.error('Uncaught exception:', error);
@@ -130,7 +131,9 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
microsoftCdnWorker.end(),
cdnDownloadWorker.end(),
telegramCidrWorker.end(),
mockAssetsWorker.end()
mockAssetsWorker.end(),
// defensive: no-op unless some FileOutput crossed the offload threshold
endOutputWorkerFarm()
]);
// Finish the build to avoid leaking timer/fetch ref