Load zaqar client outside init
Closes-bug: #1539685 Change-Id: Iad50452e750262dfb774361410507c5dcf8bbea0
This commit is contained in:
parent
5201b5eb73
commit
209a1a55ad
@ -41,7 +41,7 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier):
|
|||||||
def __init__(self, conf):
|
def __init__(self, conf):
|
||||||
super(ZaqarAlarmNotifier, self).__init__(conf)
|
super(ZaqarAlarmNotifier, self).__init__(conf)
|
||||||
self.conf = conf
|
self.conf = conf
|
||||||
self.client = self.get_zaqar_client()
|
self._zclient = None
|
||||||
|
|
||||||
def _get_endpoint(self):
|
def _get_endpoint(self):
|
||||||
try:
|
try:
|
||||||
@ -95,6 +95,12 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier):
|
|||||||
message = dict(body=body)
|
message = dict(body=body)
|
||||||
self.notify_zaqar(action, message)
|
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):
|
def notify_zaqar(self, action, message):
|
||||||
queue_info = urlparse.parse_qs(action.query)
|
queue_info = urlparse.parse_qs(action.query)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user