plugin app manager: start doesn't wait anymore for actual app start:

Application may be long to start (e.g. a Docker app may have to download images first,
and even without the downloading, the starting could be long), which may lead to UI
blocking or bridge time out.

To prevent that, `start` is now returning immediately, and 2 new signals are used to
indicate when the application is started, of if something wrong happened.

`start` now returns initial app data, including exposed data without the computed exposed
data. The computed data must be retrieved after the app has been started.
This commit is contained in:
Goffi 2023-03-04 18:30:47 +01:00
commit 6ad9431678

View file

@ -57,7 +57,7 @@ class AppManagerDocker:
self._am.register(self)
async def start(self, app_data: dict) -> None:
await self._am.startCommon(app_data)
await self._am.start_common(app_data)
working_dir = app_data['_instance_dir_path']
try:
override = app_data['override']
@ -83,7 +83,7 @@ class AppManagerDocker:
path=str(working_dir),
)
async def computeExpose(self, app_data: dict) -> dict:
async def compute_expose(self, app_data: dict) -> dict:
working_dir = app_data['_instance_dir_path']
expose = app_data['expose']
ports = expose.get('ports', {})