Closed
requested to merge github/fork/rysi3k/fix/removing_from_waiting_when_calling_moveToFailed into develop
Hi I had some specific case and found resolution so created a PR. My case:
- No available processors
- New job is added to queue
- My JS code is starting timer - max time to respond to client (some checks + addjob + processjob + parse result + sending response)
- When my timer is fired, but no workers available I need to make sure that this job will be not started (it makes no sense to start job when new processor will be available because client already got error response) So I call:
- job.discard()
- job.moveToFailed(error)
Without my change, job is added to failed list but is still hanging in wait list.
Have a nice day :)