N
N
NorroeN2017-10-14 10:15:33
Python
NorroeN, 2017-10-14 10:15:33

How to get the currently running task from rq?

I use the rq library to perform my functions through redis. There is a task (task) id and you need to find out if it is currently running. The library has a get_current_job function that returns the current task that is running, but only in the process that is already running this task. And I need to find out on the server if this task is running.
Of course, you can put flags in the database. But I would like to know if there are better solutions?
The queue in which the task is executed is known in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question