From 87b40eb6b39df16b81b5376d1faee84b437ec39b Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand <benjamin.bertrand@esss.se> Date: Mon, 18 Mar 2019 18:50:58 +0100 Subject: [PATCH] Fix excel file download The /status/<job_id> view was only looking in the "default" queue to retrieve the job. "default" is not used anymore and was replaced by "high", "normal", "low". The method Job.fetch doesn't look in a specific queue. JIRA INFRA-890 #action In Progress --- app/main/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main/views.py b/app/main/views.py index 83d41bd..ef4ca6a 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -11,10 +11,11 @@ This module implements the main blueprint. """ import os import redis +import rq import rq_dashboard from flask import Blueprint, render_template, jsonify, g, current_app, abort, request from flask_login import login_required, current_user -from rq import push_connection, pop_connection, Queue +from rq import push_connection, pop_connection from ..extensions import sentry from .. import utils @@ -115,8 +116,7 @@ def job_status(job_id): :param int job_id: The id of the job to pull :return: json with the status of the job """ - q = Queue() - job = q.fetch_job(job_id) + job = rq.job.Job.fetch(job_id) if job is None: response = {"status": "unknown"} else: -- GitLab