job.py: Use fetch to get a complete Job instance

main
Javier Lopez 9 years ago
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…
Cancel
Save