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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -