This applicaton demonstrates distributed background jobs handling with asynq.
Asynq is very impressive and easy to use. It ensures a task to be run at least once and only once.
Create an env file.
cp ./deployments/.env.example ./deployments/.env
Run the app with docker.
make docker
make upd
make log
Request bunch of (virtual)heavy tasks via exposed API.
for i in {1..11}; do; echo $i:; http http://localhost:8080/sleep seconds:=5; done;
Then watch logs to see what's happening. Individual worker containers run tasks concurrently. Concurrency inside a worker has been disabled for demonstration purposes, which is configurable in the worker configuration code.
build docker images
make docker
run with docker compose
make up
run in detached mode
make upd
docker compose log
make log
docker compose down
make down
run the test suite
make test