Skip to content
Snippets Groups Projects

Execute docker tasks in RQ

Merged Valentin Rigal requested to merge dummy-tasks into community
All threads resolved!
1 file
+ 7
1
Compare changes
  • Side-by-side
  • Inline
+ 7
1
@@ -53,6 +53,12 @@ from arkindex.users.utils import RightContent, get_max_level
logger = logging.getLogger(__name__)
# Process tasks running in RQ are hidden from user jobs
VISIBLE_QUEUES = [
q for q in QUEUES.keys()
if q != "tasks"
]
@extend_schema(tags=["users"])
@extend_schema_view(
@@ -340,7 +346,7 @@ class JobRetrieve(RetrieveDestroyAPIView):
serializer_class = JobSerializer
def get_object(self):
for queue_name in QUEUES.keys():
for queue_name in VISIBLE_QUEUES:
job = get_queue(queue_name).fetch_job(str(self.kwargs["pk"]))
if not job:
continue
Loading