python - Configure celery to wait for backend service to start -


when starting celery, retries connecting rabbitmq broker, gives necessary time load. good, because i'm using docker , can't guarantee order in services start , precisely service when.

however, while trying connect local mysql server set results backend, celery not use same measure of mercy , dies instantly, complaining, reasonably, can't lock mysqld socket:

operationalerror: (2002, "can't connect local mysql server through socket '/var/run/mysqld/mysqld.sock' (2)") 

i configure celery retry several times before giving up, possible?

thanks!

you can try depends_on option in docker-compose. defines order in services want start. can find official documentation here.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -