Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CANT_REREAD: Format string in Celery .%h

In my supervisor file I have added .%h to the end of my worker names (celery) to make them unique. For example:

[program:celery_worker]
directory = /srv/project/
command=celery -A tasks worker -l info -n default.%h

However, since added this change supervisor will not longer update or start giving the error:

, "CANT_REREAD: Format string 'celery -A tasks worker -l info -n default.%h' for 'command' is badly formatted""> file: /usr/lib/python2.7/dist-packages/supervisor/supervisorctl.py line: 947

How can I resolve this issue?

like image 244
Prometheus Avatar asked Dec 02 '22 17:12

Prometheus


1 Answers

This is an underdocumented issue: https://github.com/Supervisor/supervisor/issues/291

Just use % again to escape it:

command=celery -A tasks worker -l info -n default.%%h
like image 142
Capi Etheriel Avatar answered Dec 05 '22 06:12

Capi Etheriel