Skip to content

Commit

Permalink
Update pollOutstandingScans.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
azdak committed Nov 20, 2024
1 parent 96cfe07 commit abb0b57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/internal/pollOutstandingScans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export const pollOutstandingScans = async ({ request, reply }) => {
const startTime = new Date().getTime();
const jobIds = (await db.query({
text: `SELECT job_id, url_id FROM scans WHERE processing = TRUE`
})).rows.map(obj => {obj.job_id, obj.url_id});
}));
return jobIds;

// make sure we sort the open jobids ASC
const sortedJobIds = jobIds.jobIds.sort((a, b) => (a - b));
Expand Down

0 comments on commit abb0b57

Please sign in to comment.