Chore: increate fs write worker threshold

This commit is contained in:
SukkaW 2025-05-20 21:55:53 +08:00
parent ce42147a9d
commit 9a64111034
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ const pool = new Worktank({
});
export function compareAndWriteFileInWorker(span: Span, linesA: string[], filePath: string) {
return span.traceChildAsync(`compare and write ${filePath}`, () => pool.exec('compareAndWriteFile', [linesA, filePath, import.meta.url]));
return span.traceChildAsync(`compare and write (worker) ${filePath}`, () => pool.exec('compareAndWriteFile', [linesA, filePath, import.meta.url]));
}
process.on('beforeExit', () => pool.terminate());

View File

@ -79,7 +79,7 @@ export abstract class BaseWriteStrategy {
return;
}
if (this.result.length > 1000) {
if (this.result.length > 2000) {
return compareAndWriteFileInWorker(
span,
this.withPadding(