Skip to content

mfloresVicomtech/flask-redis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask - Reddis example

This is a simple example of Flask and Reddis with a worker with some job types. It includes also rq-dashboard and/or redisinsight for monitoring the queue.

It consists of a queue service based on a micro api on Flask and an integrated Redis both running together, and a worker service that's just a base Python with rq as a dependency and a jobs.py script with just a collection of task that it can run.

How to run

  1. Run the thing:

    docker compose -p flask_redis up -d
  2. Check if project works: flask-redis

  3. Test it posting some jobs:

    • curl -X POST 'localhost:5000/job/long_task?delay=5'
    • curl -X POST 'localhost:5000/job/io_task?amount=100000000'
    • curl -X POST 'localhost:5000/job/cpu_task?power=8'
  4. Monitor :

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.0%
  • Dockerfile 5.0%
  • Procfile 1.0%