Skip to content

Commit 6d2c5af

Browse files
committed
Adapted remaining method to cs3-client
1 parent ab7d8d2 commit 6d2c5af

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/core/cs3iface.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,19 @@ def init(inconfig, inlog):
4949
def healthcheck():
5050
"""Probes the storage and returns a status message. For cs3 storage, we execute a call to ListAuthProviders"""
5151
try:
52-
Auth(client).ListAuthProviders()
53-
log.debug('msg="Executed ListAuthProviders as health check" endpoint="%s"' % (ctx["revagateway"]))
52+
Auth(client).list_auth_providers()
53+
log.debug('msg="Executed ListAuthProviders as health check" endpoint="%s"' % (config["cs3client"]["host"]))
5454
return "OK"
5555
except ConnectionError as e:
5656
log.error(
57-
'msg="Health check: failed to call ListAuthProviders" endpoint="%s" error="%s"' % (ctx["revagateway"], e)
57+
'msg="Health check: connection error when calling ListAuthProviders" endpoint="%s" error="%s"' % (config["cs3client"]["host"], e)
5858
)
59-
return str(e)
59+
return "FAIL"
60+
except Exception as e:
61+
log.error(
62+
'msg="Health check: failed to call ListAuthProviders" endpoint="%s" error="%s"' % (config["cs3client"]["host"], e)
63+
)
64+
return "FAIL"
6065

6166

6267
def getuseridfromcreds(token, wopiuser):

0 commit comments

Comments
 (0)