From 1819ee75ef260d468b9fa1e64e387f1ec8ed7d6e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 13 Aug 2023 22:23:15 +0200 Subject: [PATCH] `s/Application.stop_app/Application.stop/g` --- platypush/app.py | 8 +++++--- tests/conftest.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/platypush/app.py b/platypush/app.py index 9f6151b5a..bb162489d 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 017042aed..9e3013ddb 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:///') :]