diff --git a/tricircle/common/restapp.py b/tricircle/common/restapp.py index 40e4b14e..a5d07ab8 100644 --- a/tricircle/common/restapp.py +++ b/tricircle/common/restapp.py @@ -45,7 +45,8 @@ def serve(api_service, conf, workers=1): if _launcher: raise RuntimeError(_('serve() can only be called once')) - _launcher = service.launch(conf, api_service, workers=workers) + _launcher = service.ProcessLauncher(conf, restart_method='mutate') + _launcher.launch_service(api_service, workers=workers) def wait(): diff --git a/tricircle/xjob/xservice.py b/tricircle/xjob/xservice.py index 7de5d84d..35d76b2f 100644 --- a/tricircle/xjob/xservice.py +++ b/tricircle/xjob/xservice.py @@ -245,7 +245,8 @@ def serve(xservice, workers=1): if _launcher: raise RuntimeError(_('serve() can only be called once')) - _launcher = srv.launch(CONF, xservice, workers=workers) + _launcher = srv.ProcessLauncher(CONF, restart_method='mutate') + _launcher.launch_service(xservice, workers=workers) def wait():