Skip to content

Commit

Permalink
Transfers: add bulk_query to tranfsertool contract
Browse files Browse the repository at this point in the history
It's the one which is actually used since many years. The base class
was never updated to reflect the actual code.

This will get rid of multiple linter warnings.
  • Loading branch information
Radu Carpa committed Nov 20, 2023
1 parent 0c5056f commit fec6ac3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
11 changes: 0 additions & 11 deletions lib/rucio/transfertool/globus.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,5 @@ def bulk_update(self, resps, request_ids):
def cancel(self):
pass

def query(self, transfer_ids, details=False, timeout=None):
"""
Query the status of a transfer in Globus Online.
:param transfer_ids: transfer identifiers as list of strings.
:param details: Switch if detailed information should be listed.
:param timeout: Timeout in seconds.
:returns: Transfer status information as a list of dictionaries.
"""
pass

def update_priority(self):
pass
3 changes: 0 additions & 3 deletions lib/rucio/transfertool/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ def bulk_query(self, requests_by_eid: dict[str, dict[str, dict[str, Any]]], time
response.setdefault(transfer_id, {})[request_id] = MockTransferStatusReport(request_id, transfer_id)
return response

def query(self, transfer_ids: Sequence[str], details: bool = False, timeout: Optional[float] = None):
return [{'status': 'ok'}]

def cancel(self, transfer_ids: Sequence[str], timeout: Optional[float] = None):
return True

Expand Down
10 changes: 4 additions & 6 deletions lib/rucio/transfertool/transfertool.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,12 @@ def submit(self, transfers, job_params, timeout=None):
pass

@abstractmethod
def query(self, transfer_ids, details=False, timeout=None):
def bulk_query(self, requests_by_eid, timeout=None):
"""
Query the status of transfers in the transfertool.
Query the status of a bulk of transfers in FTS3 via JSON.
:param transfer_ids: List of transfertool internal identifiers as a string.
:param details: Switch if detailed information should be listed.
:param timeout: Timeout in seconds.
:returns: Transfer status information as list of dictionaries.
:param requests_by_eid: dictionary {external_id1: {request_id1: request1, ...}, ...} of request to be queried
:returns: Transfer status information as a dictionary.
"""
pass

Expand Down

0 comments on commit fec6ac3

Please sign in to comment.