mirror of https://github.com/rq/rq.git
job.py: Use fetch to get a complete Job instance
This commit is contained in:
parent
1116089b43
commit
c5e62c70bb
|
@ -58,7 +58,7 @@ def cancel_job(job_id, connection=None):
|
||||||
"""Cancels the job with the given job ID, preventing execution. Discards
|
"""Cancels the job with the given job ID, preventing execution. Discards
|
||||||
any job info (i.e. it can't be requeued later).
|
any job info (i.e. it can't be requeued later).
|
||||||
"""
|
"""
|
||||||
Job(job_id, connection=connection).cancel()
|
Job.fetch(job_id, connection=connection).cancel()
|
||||||
|
|
||||||
|
|
||||||
def requeue_job(job_id, connection=None):
|
def requeue_job(job_id, connection=None):
|
||||||
|
|
Loading…
Reference in New Issue