Skip to content

Sample project to show possibility of checking heartbeat of Celery workers

Notifications You must be signed in to change notification settings

metaclassco/celery_testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 build

and run with

docker-compose up  # or docker-compose up -d

To test Slack notifications on worker failure you can do next:

  • go to running container with docker-compose exec worker bash and stop Celery in it;
  • build container without started Celery worker:
    export TEST_FAILURE=true
    docker-compose build
    To build initial container you need to call
    unset TEST_FAILURE

To checking usage of server resources, to cronjobs added related Python script.

About

Sample project to show possibility of checking heartbeat of Celery workers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published