Skip to content

Commit a0a2eb4

Browse files
committed
Revert "just the keyfns"
This reverts commit b7415ca99d8bc74b34e8c8068741798143b8b692.
1 parent eddab04 commit a0a2eb4

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

irods/data_object.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,12 @@ class _repl_status(enum.Enum): # noqa: N801
7171

7272

7373
def REPLICA_NUMBER_SORT_KEY_FN(row): # noqa: N802
74-
"""Key function to sort replica on replica number (numerically).
75-
76-
Args:
77-
row - an element within a collection to be sorted. This row represents a replica query result from the database.
78-
79-
Returns:
80-
A key for the "row" which conforms to the same ordering as its replica_number attribute, considered as an integer.
81-
"""
74+
"""Key function to sort replica results on replica number."""
8275
return row[DataObject.replica_number]
8376

8477

8578
def REPLICA_FITNESS_SORT_KEY_FN(row): # noqa: N802
86-
"""Key function to sort replica results according to a "fitness" strategy; with the most recent good replicas first in the order.
87-
88-
Args:
89-
row - an element within a collection to be sorted. This row represents a replica query result from the database.
90-
91-
Returns:
92-
A key for the "row" which conforms to the same ordering as the tuple: (replica_goodness(row), age_of_last_modification(row)).
93-
"""
79+
"""Key function to sort replica results first on replica quality, then on age of modification timestamp ."""
9480
repl_status = int(row[DataObject.replica_status])
9581

9682
repl_status_rank = _REPL_STATUSES.index(repl_status) if _REPL_STATUSES.count(repl_status) else sys.maxsize

0 commit comments

Comments
 (0)