From 95e0871893fcf05e90b7690bd1694cb4ad014010 Mon Sep 17 00:00:00 2001 From: Kevin Le Date: Thu, 16 Feb 2017 14:58:22 -0700 Subject: [PATCH] atom beautify, polling works for multiple jobs and is displaying (albeit ugly). need to fix spinner --- app/main/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)