We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d973be7 commit f2360efCopy full SHA for f2360ef
1 file changed
packages/scraper/scraper.ts
@@ -142,6 +142,9 @@ export async function scrape(options: ScrapeOptions) {
142
// Keep-alive: prevent Bun from exiting when event loop has no native I/O pending
143
// (Bun may drain the event loop while async generators/promises are still active)
144
const keepAlive = setInterval(() => {}, 60_000);
145
+ const cleanup = () => { clearInterval(keepAlive); process.exit(0); };
146
+ process.on("SIGINT", cleanup);
147
+ process.on("SIGTERM", cleanup);
148
149
header("docx-corpus", version);
150
0 commit comments