diff --git a/app/main/views.py b/app/main/views.py index 2e799db2..14fc17cd 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -12,6 +12,7 @@ bp = Blueprint('main', __name__) + def fetch_job(job_id): ''' Iterates through all queues looking for the job. @@ -19,11 +20,12 @@ def fetch_job(job_id): print 'received' print job_id for queue in current_app.config['QUEUES']: - q = Queue(queue,connection=Redis()) + q = Queue(queue, connection=Redis()) job = q.fetch_job(job_id) if job is not None: return job + @bp.route('/results/') def job_status(job_id): job = fetch_job(job_id)