@@ -243,8 +243,10 @@ def __init__(self, client_name='default', one=None, label='ibllib patch'):
243243 # transfers/delete from the current computer to the flatiron: mandatory and executed first
244244 local_id = self .endpoints ['local' ]['id' ]
245245 self .globus_transfer = globus_sdk .TransferData (
246- self .client , local_id , flatiron_id , verify_checksum = True , sync_level = 'checksum' , label = label )
247- self .globus_delete = globus_sdk .DeleteData (self .client , flatiron_id , label = label )
246+ source_endpoint = local_id , destination_endpoint = flatiron_id ,
247+ verify_checksum = True , sync_level = 'checksum' , label = label
248+ )
249+ self .globus_delete = globus_sdk .DeleteData (endpoint = flatiron_id , label = label )
248250 # transfers/delete from flatiron to optional third parties to synchronize / delete
249251 self .globus_transfers_locals = {}
250252 self .globus_deletes_locals = {}
@@ -303,7 +305,7 @@ def patch_datasets(self, file_list, **kwargs):
303305 # if there is no transfer already created, initialize it
304306 if repo_gid not in self .globus_transfers_locals :
305307 self .globus_transfers_locals [repo_gid ] = globus_sdk .TransferData (
306- self . client , flatiron_id , repo_gid , verify_checksum = True ,
308+ source_endpoint = flatiron_id , destination_endpoint = repo_gid , verify_checksum = True ,
307309 sync_level = 'checksum' , label = f"{ self .label } on { fr ['data_repository' ]} " )
308310 # get the local server path and create the transfer item
309311 local_server_path = self .to_address (fr ['relative_path' ], fr ['data_repository' ])
@@ -343,17 +345,15 @@ def _wait_for_task(resp):
343345 _wait_for_task (gtc .submit_transfer (self .globus_transfer ))
344346 # re-initialize the globus_transfer property
345347 self .globus_transfer = globus_sdk .TransferData (
346- gtc ,
347- self .globus_transfer ['source_endpoint' ],
348- self .globus_transfer ['destination_endpoint' ],
348+ source_endpoint = self .globus_transfer ['source_endpoint' ],
349+ destination_endpoint = self .globus_transfer ['destination_endpoint' ],
349350 label = self .globus_transfer ['label' ],
350351 verify_checksum = True , sync_level = 'checksum' )
351352
352353 # do the same for deletes
353354 if len (self .globus_delete ['DATA' ]) > 0 :
354355 _wait_for_task (gtc .submit_delete (self .globus_delete ))
355356 self .globus_delete = globus_sdk .DeleteData (
356- gtc ,
357357 endpoint = self .globus_delete ['endpoint' ],
358358 label = self .globus_delete ['label' ])
359359
0 commit comments