#NEWLINE# def __init__( self ) : #NEWLINE# #INDENT# ssl_settings = self . _get_broker_ssl_settings ( ssl_enabled = config . instance ( ) . amqp_ssl_enabled , cert_path = config . instance ( ) . amqp_ca_path ) #NEWLINE# amqp_uri = 'amqp://{username}:{password}@{address}' . format ( address = config . instance ( ) . amqp_address , username = config . instance ( ) . amqp_username , password = config . instance ( ) . amqp_password ) #NEWLINE# self . celery = Celery ( broker = amqp_uri , backend = amqp_uri ) #NEWLINE# self . celery . conf . update ( CELERY_TASK_SERIALIZER = 'json' , CELERY_TASK_RESULT_EXPIRES = 600 ) #NEWLINE# if config . instance ( ) . amqp_ssl_enabled : #NEWLINE# #INDENT# self . celery . conf . update ( BROKER_USE_SSL = self )