There was an error while loading. Please reload this page.
1 parent a0a2eb4 commit c663554Copy full SHA for c663554
1 file changed
irods/data_object.py
@@ -70,13 +70,13 @@ class _repl_status(enum.Enum): # noqa: N801
70
_REFERENCE_DATETIME = datetime.fromtimestamp(0, timezone.utc)
71
72
73
+# Key functions to dictate how replica row results will be sorted within an iRODSDataObject.
74
+
75
def REPLICA_NUMBER_SORT_KEY_FN(row): # noqa: N802
- """Key function to sort replica results on replica number."""
76
return row[DataObject.replica_number]
77
78
79
def REPLICA_FITNESS_SORT_KEY_FN(row): # noqa: N802
- """Key function to sort replica results first on replica quality, then on age of modification timestamp ."""
80
repl_status = int(row[DataObject.replica_status])
81
82
repl_status_rank = _REPL_STATUSES.index(repl_status) if _REPL_STATUSES.count(repl_status) else sys.maxsize
0 commit comments