Skip to content

Commit

Permalink
fix: wait until ready before trying to get jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Jul 24, 2019
1 parent 23d8dcc commit f3b768f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/classes/queue-getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export class QueueGetters extends QueueBase {
}

async getJobs(types: string[] | string, start = 0, end = -1, asc = false) {
await this.waitUntilReady();
types = Array.isArray(types) ? types : [types];

if (types.indexOf('waiting') !== -1) {
Expand Down

0 comments on commit f3b768f

Please sign in to comment.