To run this project, you need docker.
docker compose upTheres a function called calculate_pi in worker/pi_calc.py.
- Create a task in worker/app.py to run that function
- Add an endpoint in api/app.py to access this function
results can be found in the branch calculate-pi
For local development, there are running scripts in root dir, worker and api.
- add execute permissions
chmod +x run.sh run_worker.sh run_api.sh - run docker-compose without api and worker
./run.sh - run worker
./run_worker.sh - run api
./run_api.sh
The api and worker will automatically reload when files in their folder are changed.