Skip to content

Commit e31bfc0

Browse files
authored
fix: make the wait message not look like an error (#225)
_resolves #224 Signed-off-by: Anupam Kumar <kyteinsky@gmail.com>
1 parent e3fbb38 commit e31bfc0

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

main_em.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@
5959
if not ret.json().get('enabled', False):
6060
raise RuntimeError('Main app is not enabled, sleeping for a while...')
6161
except (httpx.RequestError, RuntimeError) as e:
62-
print(f'{MAX_TRIES-_max_tries+1}/{MAX_TRIES}: Error checking main app status: {e}', flush=True)
62+
print(
63+
f'{MAX_TRIES-_max_tries+1}/{MAX_TRIES}:'
64+
f' [Embedding server] Waiting for the main app to be enabled/ready: {e}',
65+
flush=True,
66+
)
6367
_last_err = e
6468
sleep(STARTUP_CHECK_SEC)
6569
_max_tries -= 1
@@ -69,7 +73,14 @@
6973
break
7074

7175
if not _enabled:
72-
logger.error('Failed waiting for the main app to be enabled, exiting...', exc_info=_last_err)
76+
logger.error(
77+
'Failed waiting for the main app to be enabled. This could indicate an issue with the AppAPI'
78+
' Deploy Daemon setup or some issue in the main app setup. Some common causes of the latter'
79+
' could be no/no stable internet connection to download the required models, disk space full,'
80+
' or this app not being able to contact the Nextcloud server to report progress of the model'
81+
' download.',
82+
exc_info=_last_err,
83+
)
7384
exit(1)
7485

7586
# update model path to be in the persistent storage if it is not already valid

0 commit comments

Comments
 (0)