Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
oxabz committed Jul 7, 2021
1 parent 481287e commit 4d21658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BackEnd/adapter/bullAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class BatchedJob extends Job {
getState() {
return super.getState().then(state => {
if (this._bullJob.data.results[this._i] !== null && this._bullJob.data.results[this._i] !== undefined) return Queue.JOB_STATES.COMPLETED;
if (this._bullJob.data.errors[this._i] !== null && this._bullJob.data.errors[this._i] !== undefined) return (state === Queue.JOB_STATES.DELAYED ? Queue.JOB_STATES.DELAYED : Queue.JOB_STATES.FAILED);
if (this._bullJob.data.errors[this._i] !== null && this._bullJob.data.errors[this._i] !== undefined) return (state === Queue.JOB_STATES.DELAYED || state === Queue.JOB_STATES.ACTIVE ? Queue.JOB_STATES.DELAYED : Queue.JOB_STATES.FAILED);
if (this._i === 0 ||
this._bullJob.data.results[this._i - 1] !== null && this._bullJob.data.results[this._i - 1] !== undefined ||
this._bullJob.data.errors[this._i - 1] !== null && this._bullJob.data.errors[this._i - 1] !== undefined) return Queue.JOB_STATES.ACTIVE;
Expand Down

0 comments on commit 4d21658

Please sign in to comment.