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

PAN-2270: Point to certs #148

Merged
Merged
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
6 changes: 5 additions & 1 deletion pantos/servicenode/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import amqp # type: ignore
import celery # type: ignore
import certifi # type: ignore
from pantos.common.logging import LogFile
from pantos.common.logging import LogFormat
from pantos.common.logging import initialize_logger
Expand Down Expand Up @@ -41,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)
"""Celery application instance."""

# Additional Celery configuration
Expand Down