diff --git a/linux/scripts/pantos-service-node-celery b/linux/scripts/pantos-service-node-celery index 18e92dd..247c3bf 100644 --- a/linux/scripts/pantos-service-node-celery +++ b/linux/scripts/pantos-service-node-celery @@ -53,7 +53,7 @@ PROGRAM="./bin/python" if [ "$DEV_MODE" = "true" ]; then echo "Running in development mode" ./bin/pip install watchdog[watchmedo] - PROGRAM="./bin/watchme autorestart --directory=$APP_DIR --pattern=*.py --recursive -- ./bin/python" + PROGRAM="./bin/watchmedo auto-restart --directory=$APP_DIR --pattern=*.py --recursive -- ./bin/python" fi if [ -n "$PANTOS_STATUS_MONITOR" ]; then diff --git a/pantos/servicenode/celery.py b/pantos/servicenode/celery.py index 7e43e7c..5f2c103 100644 --- a/pantos/servicenode/celery.py +++ b/pantos/servicenode/celery.py @@ -52,8 +52,10 @@ def is_main_module() -> bool: # Additional Celery configuration celery_app.conf.update( - result_expires=None, task_default_exchange='pantos.servicenode', - task_default_queue='transfers', task_routes={ + result_expires=None, + task_default_exchange='pantos.servicenode', + task_default_queue='transfers', + task_routes={ 'pantos.servicenode.business.plugins.execute_bid_plugin': { 'queue': _BIDS_QUEUE_NAME }, @@ -63,7 +65,13 @@ def is_main_module() -> bool: 'pantos.common.blockchains.tasks.*': { 'queue': _TRANSFERS_QUEUE_NAME } - }, task_track_started=True, worker_enable_remote_control=False) + }, + task_track_started=True, + worker_enable_remote_control=False, + # Make sure the broker crashes if it can't connect on startup + broker_connection_retry=10, + broker_channel_error_retry=True, + broker_connection_retry_on_startup=False) if is_main_module(): # pragma: no cover # purge the bids queue at startup