Skip to content

Commit 76fda5b

Browse files
committed
one remote globus
1 parent 8ebcc03 commit 76fda5b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

ibllib/oneibl/data_handlers.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ def __init__(self, session_path, signatures, one=None):
118118
:param signature: input and output file signatures
119119
:param one: ONE instance
120120
"""
121-
from one.globus import Globus, get_lab_from_endpoint_id # noqa
121+
from one.remote.globus import Globus, get_lab_from_endpoint_id # noqa
122122
super().__init__(session_path, signatures, one=one)
123123
self.globus = Globus(client_name='server')
124124

125125
# on local servers set up the local root path manually as some have different globus config paths
126126
self.globus.endpoints['local']['root_path'] = '/mnt/s0/Data/Subjects'
127127

128128
# Find the lab
129-
labs = get_lab_from_endpoint_id(one=self.one)
129+
labs = get_lab_from_endpoint_id(alyx=self.one.alyx)
130130

131131
if len(labs) == 2:
132132
# for flofer lab
@@ -137,9 +137,9 @@ def __init__(self, session_path, signatures, one=None):
137137

138138
# For cortex lab we need to get the endpoint from the ibl alyx
139139
if self.lab == 'cortexlab':
140-
self.globus.add_endpoint(f'flatiron_{self.lab}', one=ONE(base_url='https://alyx.internationalbrainlab.org'))
140+
self.globus.add_endpoint(f'flatiron_{self.lab}', alyx=ONE(base_url='https://alyx.internationalbrainlab.org').alyx)
141141
else:
142-
self.globus.add_endpoint(f'flatiron_{self.lab}')
142+
self.globus.add_endpoint(f'flatiron_{self.lab}', alyx=self.one.alyx)
143143

144144
def setUp(self):
145145
"""
@@ -250,13 +250,16 @@ def __init__(self, task, session_path, signature, one=None):
250250
:param signature: input and output file signatures
251251
:param one: ONE instance
252252
"""
253-
from one.globus import Globus # noqa
253+
from one.remote.globus import Globus # noqa
254254
super().__init__(session_path, signature, one=one)
255255
self.task = task
256256
self.aws = AWS(one=self.one)
257257
self.globus = Globus(client_name='server')
258258
self.lab = session_path_parts(self.session_path, as_dict=True)['lab']
259-
self.globus.add_endpoint(f'flatiron_{self.lab}')
259+
if self.lab == 'cortexlab':
260+
self.globus.add_endpoint(f'flatiron_{self.lab}', alyx=ONE(base_url='https://alyx.internationalbrainlab.org').alyx)
261+
else:
262+
self.globus.add_endpoint(f'flatiron_{self.lab}', alyx=self.one.alyx)
260263

261264
def setUp(self):
262265
"""

0 commit comments

Comments
 (0)