mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 09:19:31 +00:00
archive checkpoint: Reset timer after the checkpoint has been committed
This commit is contained in:
parent
3193af5482
commit
9dce2362cc
1 changed files with 2 additions and 3 deletions
|
@ -163,10 +163,9 @@ def iter_items(self, filter=None, preload=False):
|
|||
|
||||
def add_item(self, item):
|
||||
self.items_buffer.add(item)
|
||||
now = time.time()
|
||||
if now - self.last_checkpoint > self.checkpoint_interval:
|
||||
self.last_checkpoint = now
|
||||
if time.time() - self.last_checkpoint > self.checkpoint_interval:
|
||||
self.write_checkpoint()
|
||||
self.last_checkpoint = time.time()
|
||||
|
||||
def write_checkpoint(self):
|
||||
self.save(self.checkpoint_name)
|
||||
|
|
Loading…
Reference in a new issue