Questions tagged [python-rq]

RQ is a simple, lightweight, Python library for creating background jobs, and processing them.

RQ (Redis Queue) is a simple library for queueing jobs and processing them in the background with workers. It is backed by and it is designed to have a low barrier to entry. It should be integrated in your web stack easily.

Resources

171 questions
0
votes
1 answer

RQ Worker Processing Jobs in a Batch

Say you have a RQ Queue with lots of jobs, which gets filled from various sources. Those Jobs would be more efficiently processed in batches, eg pulling and processing 100 Jobs at a time. How would you achieve this in RQ? Would you need to write a…
Jethro
  • 3,029
  • 3
  • 27
  • 56
0
votes
0 answers

How can I ensure that this Python RQ task on a Redis server is being executed?

In a Flask app, I have a function that takes a list of lists and adds each as a row to an Excel file. This function works fine on a development server when the request won't time out. Here it is wrapped in a try/except block. This is how I need to…
Peter Charland
  • 409
  • 6
  • 18
0
votes
2 answers

Issue Deploying Heroku App - RQ Worker: wrong number of arguments for 'HSET' command

Modifying an app based on this example, I am having a problem when deploying my updated Heroku app during initialization of the web.1 dyno. Everything is working fine in my development envr; when I start the 'app' and 'worker' executables directly,…
0
votes
2 answers

I am getting this error The DNS operation timed out after 20.000144004821777 seconds when running my app in cygwin instead of my windows terminal

so I am trying to do some background job to run in my flask app , and in order to run the worker, I needed to use cygwin instead of my windows terminal. My application use MongoDb Atlas for documents storage and it works perfectly fine when I "flask…
Adil Nouhail
  • 53
  • 1
  • 2
  • 4
0
votes
1 answer

Specifying which processes implement RQ worker using mpirun

I am using RQ to implement a job queue on a cluster, where the jobs are managed and run with Python. The RQ workers are launched via mpirun, followed by a Python program which adds jobs to the queue. I have noticed that when I only have a single…
Brian
  • 115
  • 8
0
votes
1 answer

python-rq scheduler count the number of times job executed

I'm using Django-rq which has the functionality of Scheduling the jobs with specified interval. https://github.com/rq/django-rq#support-for-rq-scheduler task = scheduler.schedule( scheduled_time=datetime.utcnow(), # Time for first execution, in…
Arbazz Hussain
  • 1,622
  • 2
  • 15
  • 41
0
votes
1 answer

RQ Python "Working outside of application context"

I'm trying to use Redis & RQ to set the task of sending an email, however, the "RQ Worker" is returning runtime error while using the function to send emails outside q.enqueue works fine. app/routes.py routes = Blueprint("routes", __name__) r =…
Shawky Ahmed
  • 35
  • 10
0
votes
1 answer

Redis Queue: How to prevent chained Jobs from running asynchronously

I'm trying to get 3 Jobs to run after each other in the sequence: Job1 -> Job2 -> Job3 These 3 jobs are defined in operations.py: def Job1(x): return x def Job2(x): return x * x def Job3(x): print(x) I'm calling these jobs in…
user248884
  • 851
  • 1
  • 11
  • 21
0
votes
3 answers

Queue background tasks in Python application on Windows

I am trying to build a Flask application on Windows where user uploads a big Excel file then it is processed in Python which takes 4-5 minutes. I need to process those tasks in background after user uploads the file. I RQ, Celery, etc. but those are…
Anil Patel
  • 31
  • 1
  • 4
0
votes
1 answer

Why doesn't RQ raise exceptions after logging.config.dictConfg?

I'd like to use logging.config.dictConfig within my RQ worker. But, I found that after I run dictConfig(), the worker will no longer raise exceptions which won't work in production. Here's my worker code: import logging import logging.config config…
matthewatabet
  • 1,463
  • 11
  • 26
0
votes
1 answer

How to fetch output immediately in python-rq?

I want to render output from rq immediately after it gets completed. Currently, I am using Job.fetch() to fetch tasks. But I have to repeatedly check after a certain interval for that. I am using flask-socketio to render results. Is there some way I…
alter123
  • 601
  • 2
  • 11
  • 32
0
votes
1 answer

Flask Session UnpickleError

I have a long running function which I want to run on heroku as a background function. I'm using redis and rq to manage this. My dashboard view function which loads the data into the session object starts with: @login_required @main.route('/dash',…
user1592380
  • 34,265
  • 92
  • 284
  • 515
0
votes
1 answer

rq queue always empty

I'm using django-rq in my project. What I want to achieve: I have a first view that loads a template where an image is acquired from webcam and saved on my pc. Then, the view calls a second view, where an asynchronous task to process the image is…
Caterina
  • 27
  • 6
0
votes
1 answer

Python-rq with flask + uwsgi + Nginx : Do I need more uwsgi processes or redis workers?

I have a server with above configuration and I am processing long tasks but I have to update user about the process state, which I am doing through Firebase. To respond to the client immediately I enqueue the job in redis using python-rq. I am using…
rusty
  • 652
  • 7
  • 21
0
votes
1 answer

Make my python scikit in function in python-rq queue run faster?

I currently have a utilities.py file that has this machine learning function from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.model_selection…
nadermx
  • 2,596
  • 7
  • 31
  • 66