This is a sample project to show:
- how we can check that Celery workers are active;
- how we can inform our team with Slack notifications in other case.
Before building Docker container SLACK_TOKEN must to be passed as env variable
export SLACK_TOKEN=<your-slack-token>Then you can build container as usual
docker-compose buildand run with
docker-compose up # or docker-compose up -dTo test Slack notifications on worker failure you can do next:
- go to running container with
docker-compose exec worker bashand stop Celery in it; - build container without started Celery worker:
To build initial container you need to call
export TEST_FAILURE=true docker-compose buildunset TEST_FAILURE
To checking usage of server resources, to cronjobs added related Python script.