Skip to content

Commit

Permalink
make custom abrot signal
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJustChew committed Jul 26, 2024
1 parent af81b41 commit fd74f49
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runners/update-courses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ const job = schedule.scheduleJob('0 0 * * *', async () => {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.CRON_SECRET}`
}
},
signal: AbortSignal.timeout(5*60*1000) // 5 minutes
});
const res2 = await fetch('http://localhost:8080/api/scrape-syllabus?semester=11310', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.CRON_SECRET}`
}
},
signal: AbortSignal.timeout(20*60*1000) // 20 minutes
});
const res3 = await fetch('http://localhost:8080/api/sync-algolia?semester=11310', {
method: 'GET',
Expand Down

0 comments on commit fd74f49

Please sign in to comment.