Skip to content

Commit 13e32f8

Browse files
fix: remove early stop logic in Web3Career job fetching to process all new jobs
Previously, the service would stop processing all jobs after encountering the first existing job, preventing new jobs from being added to the database. Now it skips existing jobs but continues processing the rest.
1 parent 5c1de52 commit 13e32f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jobs/web3career.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export class Web3CareerService {
5252
data: job,
5353
},
5454
};
55-
// EARLY STOP: if job already exists assume remaining are older.
55+
// Check if job already exists - if so, skip it but continue processing others
5656
const exists = await this.jobService.jobExists(job.apply_url);
5757
if (exists) {
58-
this.logger.log(`Encountered existing Web3Career job ${job.apply_url}; stopping further processing.`);
59-
break;
58+
this.logger.log(`Skipping existing Web3Career job ${job.apply_url}`);
59+
continue;
6060
}
6161
const upserted = await this.jobService.upsertJob(jobInput);
6262
newJobs.push(upserted);

0 commit comments

Comments
 (0)