Esempio n. 1
0
 def _is_agent_registered(self):
     celery_client = utils.get_celery_client(
         broker_url=self.broker_url,
         ssl_enabled=self.broker_ssl_enabled,
         ssl_cert_path=self._get_ssl_cert_path())
     try:
         self._logger.debug('Retrieving daemon registered tasks')
         return utils.get_agent_registered(self.name, celery_client)
     finally:
         if celery_client:
             celery_client.close()
Esempio n. 2
0
 def _is_agent_registered(self):
     celery_client = utils.get_celery_client(
         broker_url=self.broker_url,
         broker_ssl_enabled=self.broker_ssl_enabled,
         broker_ssl_cert_path=self.broker_ssl_cert_path)
     try:
         self._logger.debug('Retrieving daemon registered tasks')
         return utils.get_agent_registered(
                 self.name,
                 celery_client,
                 timeout=AGENT_IS_REGISTERED_TIMEOUT)
     finally:
         if celery_client:
             celery_client.close()
Esempio n. 3
0
 def _is_agent_registered(self):
     if self.cluster:
         # only used for manager failures during installation - see
         # detailed comment in the ._get_amqp_client method
         celery_client = utils.get_cluster_celery_client(
             self.broker_url, self.cluster)
     else:
         celery_client = utils.get_celery_client(
             broker_url=self.broker_url,
             broker_ssl_enabled=self.broker_ssl_enabled,
             broker_ssl_cert_path=self.broker_ssl_cert_path)
     try:
         self._logger.debug('Retrieving daemon registered tasks')
         return utils.get_agent_registered(
             self.name, celery_client, timeout=AGENT_IS_REGISTERED_TIMEOUT)
     finally:
         if celery_client:
             celery_client.close()