Skip to content

Commit

Permalink
fix: ensure new jobs are put on the left side of the job processing q…
Browse files Browse the repository at this point in the history
…ueue
  • Loading branch information
simllll committed Oct 15, 2020
1 parent a39c809 commit 30e68ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/JobProcessingQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export class JobProcessingQueue {
});

if (matchIndex === -1) {
this._queue.push(job);
// put on left side of the queue
this._queue.unshift(job);
} else {
this._queue.splice(matchIndex, 0, job);
}
Expand Down

0 comments on commit 30e68ba

Please sign in to comment.