small refactor
This commit is contained in:
+7
-4
@@ -99,7 +99,7 @@ class Manager:
|
||||
def _send_incremental(
|
||||
self, local_dataset: Dataset, remote_dataset: Dataset
|
||||
) -> Popen | None:
|
||||
"""Send incremental stream between two datasets to remote."""
|
||||
"""Send incremental stream between two datasets to remote, return the pipe. If local and remote snapshot are identical, perform nothing and return None."""
|
||||
start_snapshot = self._get_newest_common_snapshot_with_backup_tags(
|
||||
local_dataset, remote_dataset
|
||||
)
|
||||
@@ -118,8 +118,7 @@ class Manager:
|
||||
"""From all snapshots in the dataset, get the newest one that matches the backup tags in the config."""
|
||||
snapshots = self._find_snapshots_with_backup_tag(dataset)
|
||||
snapshots.sort()
|
||||
end_snapshot = snapshots[-1]
|
||||
return end_snapshot
|
||||
return snapshots[-1]
|
||||
|
||||
@property
|
||||
def _datasets_to_backup(self) -> list[Dataset]:
|
||||
@@ -848,4 +847,8 @@ def _verify_running_as_root() -> None:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
try:
|
||||
main()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
exit(EXIT_ERROR)
|
||||
|
||||
Reference in New Issue
Block a user