Skip to content

Commit

Permalink
atom beautify, polling works for multiple jobs and is displaying (alb…
Browse files Browse the repository at this point in the history
…eit ugly). need to fix spinner
  • Loading branch information
kevinkle committed Feb 16, 2017
1 parent 7f09283 commit 95e0871
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@

bp = Blueprint('main', __name__)


def fetch_job(job_id):
'''
Iterates through all queues looking for the job.
'''
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/<job_id>')
def job_status(job_id):
job = fetch_job(job_id)
Expand Down

0 comments on commit 95e0871

Please sign in to comment.