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:
@@ -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));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user