Skip to content

Commit 922b266

Browse files
authored
Merge pull request #485 from int-brain-lab/one_globus
One globus
2 parents 483c0c5 + 5ee27b6 commit 922b266

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
@@ -123,15 +123,15 @@ def __init__(self, session_path, signatures, one=None):
123123
:param signature: input and output file signatures
124124
:param one: ONE instance
125125
"""
126-
from one.globus import Globus, get_lab_from_endpoint_id # noqa
126+
from one.remote.globus import Globus, get_lab_from_endpoint_id # noqa
127127
super().__init__(session_path, signatures, one=one)
128128
self.globus = Globus(client_name='server')
129129

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

133133
# Find the lab
134-
labs = get_lab_from_endpoint_id(one=self.one)
134+
labs = get_lab_from_endpoint_id(alyx=self.one.alyx)
135135

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

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

149149
def setUp(self):
150150
"""
@@ -257,13 +257,16 @@ def __init__(self, task, session_path, signature, one=None):
257257
:param signature: input and output file signatures
258258
:param one: ONE instance
259259
"""
260-
from one.globus import Globus # noqa
260+
from one.remote.globus import Globus # noqa
261261
super().__init__(session_path, signature, one=one)
262262
self.task = task
263263
self.aws = AWS(one=self.one)
264264
self.globus = Globus(client_name='server')
265265
self.lab = session_path_parts(self.session_path, as_dict=True)['lab']
266-
self.globus.add_endpoint(f'flatiron_{self.lab}')
266+
if self.lab == 'cortexlab':
267+
self.globus.add_endpoint(f'flatiron_{self.lab}', alyx=ONE(base_url='https://alyx.internationalbrainlab.org').alyx)
268+
else:
269+
self.globus.add_endpoint(f'flatiron_{self.lab}', alyx=self.one.alyx)
267270

268271
def setUp(self):
269272
"""

0 commit comments

Comments
 (0)