RQ is a simple, lightweight, Python library for creating background jobs, and processing them.
RQ (Redis Queue) is a simple python library for queueing jobs and processing them in the background with workers. It is backed by redis and it is designed to have a low barrier to entry. It should be integrated in your web stack easily.
I'm using django-rq to setup background tasks using Redis. Redis is working great and the code is sending the request to Redis - but it is throwing an exception.
Exception:
Traceback (most recent call last):
File…
My jobs are all a series of requests that need to be made per object. Ie, its a User with several data points (potentially hundreds) that need to be added to that user with requests. I had originally written those requests to run synchronously but…
In my Heroku application I succesfully implemented background tasks. For this purpose I created a Queue object at the top of my views.py file and called queue.enqueue() in the appropriate view.
Now I'm trying to set a repeated job with…
I have a use case where I need to poll the API every 1 sec (basically infinite while loop). The polling will be initiated dynamically by user through an external system. This means there can be multiple polling running at the same time. The polling…
I would like to implement a queue in redis + Flask and Python.
I already implemented a query like this with RQ and it works fine if you have the Flask app and the task working on the same server. I am wondering if it is possible to create a queue…
I have 1 failed job on failed queue.
$ rq info
failed |█ 1
1 queues, 1 jobs total
As answered by @Byron Ruth, I can get that number this way:
from rq import Queue
from redis import Redis
q = Queue('failed', connection=Redis())
print len…
I'm having problems running multithreaded tasks using python RQ (tested on v0.5.6 and v0.6.0).
Consider the following piece of code, as a simplified version of what I'm trying to achieve:
thing.py
from threading import Thread
class…
I have a Flask application that schedules long running jobs to run using python-rq. One of my requirements is that the user can specify the number of jobs running at any given time.
The app doesn't need to kill any job in case the user use a smaller…
I'm building a Flask app that uses a Redis Queue. The code for the worker is:
listen = ['default']
#redis_url = os.getenv('REDISTOGO_URL', 'redis://localhost:6379')
conn = redis.from_url(redis_url)
if __name__ == '__main__':
with…
Trying to avoid having RQ display a warning message (to console) about using the meta dictionary for arbitrary property usage. We are using it as is specified, and the warning continues to display.
The warning displayed is as…
My clients can start a task from frontend (such as create PDF report), and the process pretty much like this:
In this architecture frontend need to create ajax call to check if PDF report is ready.
I want to update to web socket to make process…
I need your help on figuring out how to get RQ working with Flask. I have a simple Flask page with a bunch of links to trigger scripts which are / should enter RQ. It seems that only one "run_db_script" (see - tasks_combined.py) of them is…
I am using the Redis Cloud add-in on my Heroku application and I keep getting this error sporadically. I have tried flushing the redis DB and restarting dynos and that seems to fix it but I am curious why this is happening so often.
I am running…
I'm trying to get a basic rq working following the tutorial at https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xxii-background-jobs.
I'm running on windows 10 WSL1 ubuntu 20.04.
I installed rq using sudo apt-get install python3-rq…
I have a Flask app that sends tasks to an RQ worker which will uses Pykaldi. I am installing Pykaldi via conda and the package is quite large.
At the moment, I have my Flask app and an RQ worker running on different containers but both have Pykaldi…