Skip to content

The Distributed Task Queue is a web application that allows users to create tasks and process them asynchronously with prioritization. The application uses Flask, MongoDB, and Redis to efficiently distribute the tasks to workers, which execute them based on their priority.

Notifications You must be signed in to change notification settings

Eskabore/distributed_task_queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Task Queue

The Distributed Task Queue is a web application that allows users to create tasks and process them asynchronously with prioritization. The application uses Flask, MongoDB, and Redis to efficiently distribute the tasks to workers, which execute them based on their priority.

Features

  • Task creation with priority (low, medium, or high)
  • Asynchronous task processing using workers
  • Task monitoring and status updates
  • Priority-based task processing
  • Pagination, sorting, and filtering tasks

Technologies

  • Flask: A lightweight web framework for Python, used to create the web application.
  • MongoDB: A NoSQL database used to store tasks.
  • Redis: An in-memory data store used as a message broker for the task queue.
  • RQ (Redis Queue): A simple Python library for queueing jobs and processing them in the background with workers, built on top of Redis.
  • Flask-PyMongo: A Flask extension that provides integration with MongoDB.

Installation

  1. Clone the repository:
git clone https://github.com/eskabore/distributed_task_queue.git
  1. Change to the project directory:
cd distributed_task_queue
  1. Create a virtual environment:
python -m venv venv
  1. Activate the virtual environment:
  • On Windows:
    venv\Scripts\activate
    
  • On macOS and Linux:
    source venv/bin/activate
    
  1. Install the required packages:
pip install -r requirements.txt
  1. Set the Flask environment variables:
  • On Windows:
    set FLASK_APP=app
    set FLASK_ENV=development
  • On macOS and Linux:
    export FLASK_APP=app
    export FLASK_ENV=development
  1. Start the development server:
flask run
  1. Open your browser and navigate to http://localhost:5000/.

Usage

  1. Create a new task by clicking on "Create Task" and filling out the form.
  2. Monitor the status of your tasks by clicking on "View Tasks".
  3. View the details of a specific task by clicking on the task ID.

License

This project is licensed under the MIT License.

About

The Distributed Task Queue is a web application that allows users to create tasks and process them asynchronously with prioritization. The application uses Flask, MongoDB, and Redis to efficiently distribute the tasks to workers, which execute them based on their priority.

Topics

Resources

Stars

Watchers

Forks