`s/Application.stop_app/Application.stop/g`

This commit is contained in:
Fabio Manganiello 2023-08-13 22:23:15 +02:00
parent 827b564006
commit 1819ee75ef
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
2 changed files with 6 additions and 4 deletions

View File

@ -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):

View File

@ -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:///') :]