File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 2525import sys
2626from urllib .request import urlopen
2727
28- from simcore_service_storage .main import ApplicationSettings
28+ from simcore_service_storage .core . settings import ApplicationSettings
2929
3030SUCCESS , UNHEALTHY = 0 , 1
3131
3535# Queries host
3636# pylint: disable=consider-using-with
3737
38+ app_settings = ApplicationSettings .create_from_envs ()
3839
3940def _is_celery_worker_healthy ():
40- app_settings = ApplicationSettings .create_from_envs ()
41-
4241 assert app_settings .STORAGE_CELERY
4342 broker_url = app_settings .STORAGE_CELERY .CELERY_RABBIT_BROKER .dsn
4443
@@ -64,7 +63,7 @@ def _is_celery_worker_healthy():
6463
6564ok = (
6665 ok
67- or (bool ( os . getenv ( " STORAGE_WORKER_MODE" , "" ) and _is_celery_worker_healthy () ))
66+ or (app_settings . STORAGE_WORKER_MODE and _is_celery_worker_healthy ())
6867 or urlopen (
6968 "{host}{baseurl}" .format (
7069 host = sys .argv [1 ], baseurl = os .environ .get ("SIMCORE_NODE_BASEPATH" , "" )
You can’t perform that action at this time.
0 commit comments