From 1bc9fd7c46788f16288476e52b24ba4b43b4abbd Mon Sep 17 00:00:00 2001 From: gordon chung Date: Mon, 9 Feb 2015 17:47:36 -0500 Subject: [PATCH] clean up to use common service code service code in openstack.common has a factory type service to setup services. this change uses it. Change-Id: Ibb268e367a9c1f4a4b3addae24fd25d346c1c4a6 --- ceilometer/cmd/agent_notification.py | 7 ++----- ceilometer/cmd/collector.py | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/ceilometer/cmd/agent_notification.py b/ceilometer/cmd/agent_notification.py index ba924d29..99ad2b3b 100644 --- a/ceilometer/cmd/agent_notification.py +++ b/ceilometer/cmd/agent_notification.py @@ -21,8 +21,5 @@ from ceilometer import service def main(): service.prepare_service() - launcher = os_service.ProcessLauncher() - launcher.launch_service( - notification.NotificationService(), - workers=service.get_workers('notification')) - launcher.wait() + os_service.launch(notification.NotificationService(), + workers=service.get_workers('notification')).wait() diff --git a/ceilometer/cmd/collector.py b/ceilometer/cmd/collector.py index 2a1d9ffb..cc6d1bde 100644 --- a/ceilometer/cmd/collector.py +++ b/ceilometer/cmd/collector.py @@ -21,8 +21,5 @@ from ceilometer import service def main(): service.prepare_service() - launcher = os_service.ProcessLauncher() - launcher.launch_service( - collector.CollectorService(), - workers=service.get_workers('collector')) - launcher.wait() + os_service.launch(collector.CollectorService(), + workers=service.get_workers('collector')).wait()