diff options
author | Mehdi Abaakouk <sileht@redhat.com> | 2016-05-03 08:23:50 +0200 |
---|---|---|
committer | Mehdi Abaakouk <sileht@redhat.com> | 2016-07-13 08:54:12 +0200 |
commit | 80bc124511720c12182fe64dcae821f4f3e3d111 (patch) | |
tree | c94473856082e22a3cd4dca4a7b8a840b36c3b7a /ceilometer/notification.py | |
parent | 432f411603de71d85c3a3710676b67c022237a00 (diff) | |
download | ceilometer-80bc124511720c12182fe64dcae821f4f3e3d111.tar.gz |
move out oslo.service
This change replaces oslo.service by cotyledon.
Change-Id: I6eea5fcd26ade07fbcb5718b4285b7fa039a3b08
Diffstat (limited to 'ceilometer/notification.py')
-rw-r--r-- | ceilometer/notification.py | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/ceilometer/notification.py b/ceilometer/notification.py index 415b829c..1207bd58 100644 --- a/ceilometer/notification.py +++ b/ceilometer/notification.py @@ -146,8 +146,8 @@ class NotificationService(service_base.PipelineBasedService): return event_pipe_manager - def start(self): - super(NotificationService, self).start() + def run(self): + super(NotificationService, self).run() self.shutdown = False self.periodic = None self.partition_coordinator = None @@ -311,19 +311,18 @@ class NotificationService(service_base.PipelineBasedService): batch_timeout=cfg.CONF.notification.batch_timeout) self.pipeline_listener.start() - def stop(self): - if self.started: - self.shutdown = True - if self.periodic: - self.periodic.stop() - self.periodic.wait() - if self.partition_coordinator: - self.partition_coordinator.stop() - with self.coord_lock: - if self.pipeline_listener: - utils.kill_listeners([self.pipeline_listener]) - utils.kill_listeners(self.listeners) - super(NotificationService, self).stop() + def terminate(self): + self.shutdown = True + if self.periodic: + self.periodic.stop() + self.periodic.wait() + if self.partition_coordinator: + self.partition_coordinator.stop() + with self.coord_lock: + if self.pipeline_listener: + utils.kill_listeners([self.pipeline_listener]) + utils.kill_listeners(self.listeners) + super(NotificationService, self).terminate() def reload_pipeline(self): LOG.info(_LI("Reloading notification agent and listeners.")) |