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

This commit is contained in:
Javier Lopez 2016-05-03 15:03:58 +02:00
parent 1116089b43
commit c5e62c70bb
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ def cancel_job(job_id, connection=None):
"""Cancels the job with the given job ID, preventing execution. Discards
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):