diff --git a/platypush/app.py b/platypush/app.py index 9f6151b5a2..bb162489d4 100644 --- a/platypush/app.py +++ b/platypush/app.py @@ -348,7 +348,7 @@ class Application: self.requests_to_process and self.processed_requests >= self.requests_to_process ): - self.stop_app() + self.stop() elif isinstance(msg, Response): msg.log() elif isinstance(msg, Event): @@ -357,10 +357,12 @@ class Application: return _f - def stop_app(self): + def stop(self): """Stops the backends and the bus.""" from .plugins import RunnablePlugin + log.info('Stopping the application') + if self.backends: for backend in self.backends.values(): backend.stop() @@ -426,7 +428,7 @@ class Application: except KeyboardInterrupt: log.info('SIGINT received, terminating application') finally: - self.stop_app() + self.stop() def main(*args: str): diff --git a/tests/conftest.py b/tests/conftest.py index 017042aed7..9e3013ddb2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -45,7 +45,7 @@ def app(): yield _app logging.info('Stopping Platypush test service') - _app.stop_app() + _app.stop() clear_loggers() db = (Config.get('main.db') or {}).get('engine', '')[len('sqlite:///') :]