You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Raise ResultNotFound when Job.result() finds no job and no result (#364)
* Raise ResultNotFound when Job.result() finds no job and no result
Job.result() assumed that a result will eventually show up in Redis.
This assumption does not hold for jobs which are not in the queue
and jobs which do not keep result. In such cases Job.result() would
hang forever (or until the optional timeout is reached).
This PR changes Job.result() so that it raises a new exception
ResultNotFound, rather than waiting forever, if result is not found
and the job is not in the queue.
* Subclass ResultNotFound from RuntimeError
Co-authored-by: Samuel Colvin <[email protected]>
* Add message when raising ResultNotFound
* Improve docstring for Job.result()
* Handle ResultNotFound in Job.abort()
* Update arq/jobs.py
Co-authored-by: Samuel Colvin <[email protected]>
0 commit comments