Skip to content

A minimal demo of how to setup a job queue on a master server and have worker servers consume it.

Notifications You must be signed in to change notification settings

gnubyte/dsi-python-rq-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to make this work

On the master server

  1. Install redis-server if you don't have it already: sudo apt-get install redis-server
  2. Ensure that redis-server is running: start service redis-server
  3. Execute the script that generates and enqueues jobs python3 enqueue_jobs.py

On the worker server

Start a worker, and ensure it listens to the Redis queue on the master server by using the configuration file:
rq worker -c worker_conf.py

worker_conf.py

This file must contain the following line:
REDIS_URL = 'redis://<master server ip>:<redis listening port>' The default listening port for Redis is 6379, so most often to connect to a server with IP 123.123.123.1 you would have:
REDIS_URL = 'redis://123.123.123.1:6379'

About

A minimal demo of how to setup a job queue on a master server and have worker servers consume it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%