# Task Scheduler
The Task Scheduler is a system designed to manage and execute tasks in a distributed environment. It provides a scalable and efficient way to process tasks while considering their priorities and dependencies.
## Features
- Submit tasks with priority and dependencies
- Parallel processing of tasks based on available nodes
- Automatic scheduling of tasks based on priority levels
- Failure handling and error logging
- Scalable and configurable based on the number of nodes and maximum capacity
## Installation
1. Clone the repository:
```bash
git clone https://github.com/adroit48Dev/dth-boxw-puvi.git
cd dth-boxw-puvi
-
Create Virtual environment
pipenv shell
-
Install the required dependencies:
pipenv install -r requirements.txt
- Run the server
uvicorn src.main:app --reload (--port 8000 |optional)
docker build .
or
docker-compose up
- Create an instance of the
TaskScheduler
class:
node_count = 4
max_capacity = 2
scheduler = TaskScheduler(node_count, max_capacity)
- Project tree:
.
├── notes.txt
├── readme.md
├── requirements.txt
├── src
│ ├── __init__.py
│ ├── main.py
│ ├── task_model.py
│ └── task_scheduler.py
├── task_log.log
├── task.txt
├── tests
│ ├── __init__.py
│ └── test_tasks.py
└── test_task_log.log
- Monitor the execution progress and task logs:
tail -f task_log.log
This project is for personal testing purpose not for production use