Skip to content

satwikkansal/python-redis-queue-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple setup illustrating redis-queue based background task processing in Python. Supports heroku.

Files

  • app.py: File that defines some API resources.
  • Procfile: For heroku
  • tasks.py: A file that consists of some tasks (simple python functions) that we want to be queued.
  • worker.py: The redis queue worker node.
  • interface.py: Contains functions that you can use to interact with the queue.

Instructions for heroku

  • Add worker: python -u worker.py to your Procfile.
  • Add the redistogo addon from CLI
$ heroku addons:create redistogo
  • Start one worker dyno heroku scale worker=1
  • Deploy and should be good to go.

Demo available at background-queue.herokuapp.com/

About

A simple setup illustrating redis-queue based background task processing in Python. Supports heroku.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages