Skip to content

Commit

Permalink
AlyxClient instead of ONE in report_health (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 authored Oct 4, 2024
1 parent a1d1798 commit 41d5856
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ibllib/pipes/local_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _get_volume_usage(vol, label=''):
return {f"{label}_{k}": d[k] for k in d}


def report_health(one):
def report_health(alyx):
"""
Get a few indicators and label the json field of the corresponding lab with them.
"""
Expand All @@ -66,10 +66,10 @@ def report_health(one):
status.update(_get_volume_usage('/mnt/s0/Data', 'raid'))
status.update(_get_volume_usage('/', 'system'))

data_repos = one.alyx.rest('data-repository', 'list', globus_endpoint_id=get_local_endpoint_id())
data_repos = alyx.rest('data-repository', 'list', globus_endpoint_id=get_local_endpoint_id())

for dr in data_repos:
one.alyx.json_field_update(endpoint='data-repository', uuid=dr['name'], field_name='json', data=status)
alyx.json_field_update(endpoint='data-repository', uuid=dr['name'], field_name='json', data=status)


def job_creator(root_path, one=None, dry=False, rerun=False):
Expand Down

0 comments on commit 41d5856

Please sign in to comment.