forked from platypush/platypush
s/Application.stop_app/Application.stop/g
This commit is contained in:
parent
827b564006
commit
1819ee75ef
2 changed files with 6 additions and 4 deletions
|
@ -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):
|
||||
|
|
|
@ -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:///') :]
|
||||
|
||||
|
|
Loading…
Reference in a new issue