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
1
vote
1 answer

Trying to get supervisor to create a worker for python-rq

I am trying to get supervisor to spawn a worker following this pattern using python-RQ, much like what is mentioned in this stackoverflow question. I can start workers manually from the terminal as follows: $ venv/bin/rq worker 14:35:27 Worker…
o1sound
  • 480
  • 7
  • 22
1
vote
1 answer

Python rq-scheduler: enqueue a failed job after some interval

I am using python RQ to execute a job in the background. The job calls a third-party rest API and stores the response in the database. (Refer the code below) @classmethod def fetch_resource(cls, resource_id): import requests clsmgr =…
Premkumar chalmeti
  • 800
  • 1
  • 8
  • 23
1
vote
1 answer

Python rq.worker not honoring Django's LOGGING config

I am trying to run a standalone script outside of a Django app that interfaces with a Redis queue and uses the Python rq module. Everything is working fine but somewhere in either upgrading to Python 3.8 (from 2.7) or upgrading from Django 2.2 (from…
themanatuf
  • 2,880
  • 2
  • 25
  • 39
1
vote
1 answer

rq in Docker: "Could not resolve a Redis connection" with an otherwise working redis connection

I feel like I'm doing what every other question on this has an accepted answer suggesting. But I am unable to get a Flask app using rq to successfully connect to redis despite successfully connecting to redis using a bare Redis instance. In my app…
Andrew Schwartz
  • 4,440
  • 3
  • 25
  • 58
1
vote
1 answer

How to reuse Mongoengine connection in python rq?

I need to sync a lot of data on the back-ground using mongoengine through python rq and i would like to reuse connection. Syncing will be done all the time and i don't wanna open connection to mongo every time syncing process starts
1
vote
0 answers

How to implement image.read() for multiple images in flask request.files.getlist('images') in a separate job or asynchronously

I have an API to upload multiple images. How do I implement image.read() for multiple files asynchronously or in a separate job, such that I can respond back as soon as possible without having to wait for all the operations on the images? I have…
1
vote
0 answers

RQ job times out

I am trying to accomplish a task by using rq and redis. However the job is sometimes getting stuck importing a module. JobTimeoutException: Task exceeded maximum timeout value (100 seconds) File "rq/worker.py", line 812, in perform_job rv =…
Black Magic
  • 2,706
  • 5
  • 35
  • 58
1
vote
1 answer

RQ Scheduler throws NoRedisConnectionException

I am building an application and I am attempting to setup scheduled tasks with Redis/python-rq/rq-scheduler. I can setup a Queue just fine, like so: from redis import Redis from rq import Queue rq =…
user1960118
  • 367
  • 6
  • 17
1
vote
1 answer

Is there a Celery functionality analogous to RQ's worker burst?

RQ provides a .work(burst=True) method for its workers that are well-suited for integration tests, when you have code that enqueue's a task and then wants that task to be run synchronously. I cannot find any functionality on Celery that works like…
fiatjaf
  • 11,479
  • 5
  • 56
  • 72
1
vote
2 answers

How to access redis connection in background task

I'm trying to extend the flask-base project https://github.com/hack4impact/flask-base/tree/master/app which comes with a user model only. I'm trying to add the ability to run a background task on redis using rq. I've found…
user1592380
  • 34,265
  • 92
  • 284
  • 515
1
vote
1 answer

Starting rqworker using supervisor causes spawn error

Trying to start rqworker as stated in its README using this command: python manage.py rqworker default For some reason it gives ERROR (spawn error) and status shows FATAL Exited too quickly (process log may have details). Logs has no any…
Emin Mastizada
  • 1,375
  • 2
  • 15
  • 30
1
vote
0 answers

Task scheduler for python jobs

I have one main function which I want execute with different arguments. It's function which play video on raspberry pi using omxplayer. I would like to use scheduler which let me to plan executing of specific task, they should define time when task…
Bart
  • 21
  • 2
1
vote
1 answer

Running rqworker concurrently

I'm new to RQ and am trying to use it for a job which will run in the background. I have managed to set it up, and I'm also able to start more than one worker. Now I'm trying to run these workers concurrently. I installed supervisor and followed a…
1
vote
1 answer

Python Flask: RQ Worker raising KeyError because of environment variable

I'm trying to setup a redis queue and a worker to process the queue with my flask app. I'm implementing this to handle a task that sends emails. I'm a little confused because it appears that the stack trace is saying that my 'APP_SETTINGS'…
orangeandgrey
  • 81
  • 2
  • 8
1
vote
2 answers

No timeout for python-rq job

Is there a way to specify a "maximum" = inf timeout for a worker? I have some long-running tasks and if something fails due to timeouts I handle it internally within the worker. Can a specify this through the cli?
Flo
  • 1,367
  • 1
  • 13
  • 27