Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PAN-2094 limit clery maximum timeout #106

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion linux/scripts/pantos-service-node-celery
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 11 additions & 3 deletions pantos/servicenode/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand All @@ -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
Expand Down
Loading