Fix process not exiting after run, detect closed job listings

- All entry points with log tee now call logStream.end() + process.exit()
  (log stream kept event loop alive, blocking next cron run)
- easy_apply: detect "no longer accepting applications" and similar closed
  listing text before reporting as unsupported

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 12:19:00 -08:00
parent a498f49b95
commit d43e2025b2
4 changed files with 22 additions and 6 deletions

View File

@@ -248,8 +248,10 @@ async function main() {
return { added: totalAdded, seen: totalSeen };
}
main().catch(e => {
main().then(() => {
logStream.end(() => process.exit(0));
}).catch(e => {
console.error('Fatal:', e.message);
if (e.stack) console.error(e.stack);
process.exit(1);
logStream.end(() => process.exit(1));
});