Merge "Load zaqar client outside init"
This commit is contained in:
commit
cb44c3a5f0
@ -41,7 +41,7 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier):
|
||||
def __init__(self, conf):
|
||||
super(ZaqarAlarmNotifier, self).__init__(conf)
|
||||
self.conf = conf
|
||||
self.client = self.get_zaqar_client()
|
||||
self._zclient = None
|
||||
|
||||
def _get_endpoint(self):
|
||||
try:
|
||||
@ -95,6 +95,12 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier):
|
||||
message = dict(body=body)
|
||||
self.notify_zaqar(action, message)
|
||||
|
||||
@property
|
||||
def client(self):
|
||||
if self._zclient is None:
|
||||
self._zclient = self.get_zaqar_client()
|
||||
return self._zclient
|
||||
|
||||
def notify_zaqar(self, action, message):
|
||||
queue_info = urlparse.parse_qs(action.query)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user