From 105d82f00c85c69766dca5e9344107a191c7ec1d Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Fri, 6 Mar 2026 22:17:44 -0800 Subject: [PATCH] Cap external job classification to 50 per run Prevents spending hours classifying unknown_external jobs at the end of a long search run. Remaining get classified on next run. Co-Authored-By: Claude Opus 4.6 --- job_searcher.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/job_searcher.mjs b/job_searcher.mjs index 4470d12..9fd9cbe 100644 --- a/job_searcher.mjs +++ b/job_searcher.mjs @@ -224,9 +224,12 @@ async function main() { platformsRun.push('LinkedIn'); // Classify unknown_external jobs using the existing LinkedIn browser session - const unclassified = getJobsByStatus('new').filter(j => j.apply_type === 'unknown_external' && !j.apply_url); + // Cap at 50 per run — each one requires a click + redirect wait + const MAX_CLASSIFY = 50; + const allUnclassified = getJobsByStatus('new').filter(j => j.apply_type === 'unknown_external' && !j.apply_url); + const unclassified = allUnclassified.slice(0, MAX_CLASSIFY); if (unclassified.length > 0) { - console.log(`\nšŸ” Classifying ${unclassified.length} external jobs...`); + console.log(`\nšŸ” Classifying ${unclassified.length}/${allUnclassified.length} external jobs...`); try { const { classified, remaining } = await classifyExternalJobs(liBrowser.page, unclassified, async (job, applyType, applyUrl) => { await updateJobStatus(job.id, 'new', { apply_type: applyType, apply_url: applyUrl });