Remove unnecessary methods
Removed unnecessary methods from masakarimonitors/service.py. Change-Id: Id412a492646b072f28467f8e576432bff308fee0
This commit is contained in:
@@ -22,7 +22,6 @@ from oslo_service import service
|
|||||||
from oslo_utils import importutils
|
from oslo_utils import importutils
|
||||||
|
|
||||||
import masakarimonitors.conf
|
import masakarimonitors.conf
|
||||||
from masakarimonitors.i18n import _
|
|
||||||
from masakarimonitors.i18n import _LE
|
from masakarimonitors.i18n import _LE
|
||||||
from masakarimonitors.i18n import _LI
|
from masakarimonitors.i18n import _LI
|
||||||
from masakarimonitors import utils
|
from masakarimonitors import utils
|
||||||
@@ -120,21 +119,3 @@ class Service(service.Service):
|
|||||||
|
|
||||||
def process_launcher():
|
def process_launcher():
|
||||||
return service.ProcessLauncher(CONF)
|
return service.ProcessLauncher(CONF)
|
||||||
|
|
||||||
|
|
||||||
# NOTE: the global launcher is to maintain the existing
|
|
||||||
# functionality of calling service.serve +
|
|
||||||
# service.wait
|
|
||||||
_launcher = None
|
|
||||||
|
|
||||||
|
|
||||||
def serve(server, workers=None):
|
|
||||||
global _launcher
|
|
||||||
if _launcher:
|
|
||||||
raise RuntimeError(_('serve() can only be called once'))
|
|
||||||
|
|
||||||
_launcher = service.launch(CONF, server, workers=workers)
|
|
||||||
|
|
||||||
|
|
||||||
def wait():
|
|
||||||
_launcher.wait()
|
|
||||||
|
Reference in New Issue
Block a user