diff --git a/pantos/servicenode/celery.py b/pantos/servicenode/celery.py index be7086c..2928061 100644 --- a/pantos/servicenode/celery.py +++ b/pantos/servicenode/celery.py @@ -42,13 +42,16 @@ def is_main_module() -> bool: _logger.info('Initializing the Celery application...') initialize_application(False) +ca_certs = {} if config['celery']['broker'].startswith('amqp') else { + 'ca_certs': certifi.where() +} celery_app = celery.Celery( 'pantos.servicenode', broker=config['celery']['broker'], backend=config['celery']['backend'], include=[ 'pantos.common.blockchains.tasks', 'pantos.servicenode.business.transfers', 'pantos.servicenode.business.plugins' - ], broker_use_ssl={'ca_certs': certifi.where()}) + ], broker_use_ssl=ca_certs) """Celery application instance.""" # Additional Celery configuration