mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-06-03 01:30:57 +03:00
cleaned up progress stuff
This commit is contained in:
parent
af9d768410
commit
60560b884b
@ -637,7 +637,7 @@ class ZfsDataset:
|
|||||||
else:
|
else:
|
||||||
valid_exitcodes = [0]
|
valid_exitcodes = [0]
|
||||||
|
|
||||||
self.zfs_node.reset_progress()
|
# self.zfs_node.reset_progress()
|
||||||
self.zfs_node.run(cmd, inp=pipe, valid_exitcodes=valid_exitcodes)
|
self.zfs_node.run(cmd, inp=pipe, valid_exitcodes=valid_exitcodes)
|
||||||
|
|
||||||
# invalidate cache, but we at least know we exist now
|
# invalidate cache, but we at least know we exist now
|
||||||
|
@ -109,10 +109,10 @@ class ZfsNode(ExecuteNode):
|
|||||||
|
|
||||||
return self.__datasets.setdefault(name, ZfsDataset(self, name, force_exists))
|
return self.__datasets.setdefault(name, ZfsDataset(self, name, force_exists))
|
||||||
|
|
||||||
def reset_progress(self):
|
# def reset_progress(self):
|
||||||
"""reset progress output counters"""
|
# """reset progress output counters"""
|
||||||
self._progress_total_bytes = 0
|
# self._progress_total_bytes = 0
|
||||||
self._progress_start_time = time.time()
|
# self._progress_start_time = time.time()
|
||||||
|
|
||||||
def parse_zfs_progress(self, line, hide_errors, prefix):
|
def parse_zfs_progress(self, line, hide_errors, prefix):
|
||||||
"""try to parse progress output of zfs recv -Pv, and don't show it as error to the user """
|
"""try to parse progress output of zfs recv -Pv, and don't show it as error to the user """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user