# HG changeset patch # User Tuomo Valkonen # Date 1534305468 18000 # Node ID 4a56dda097452698752c81cdf2769c5d036b7759 # Parent df0de44d2c4b914df619ec7035bcdc9655f01329 Pruning scheduling fix diff -r df0de44d2c4b -r 4a56dda09745 borgend/backup.py --- a/borgend/backup.py Fri Feb 16 23:25:30 2018 +0000 +++ b/borgend/backup.py Tue Aug 14 22:57:48 2018 -0500 @@ -271,6 +271,7 @@ self.previous_operation_of_type={} self.state=State.INACTIVE self.timeclass=DreamTime + self.start_time=self.timeclass.now() self.__decode_config(cfg) @@ -517,6 +518,7 @@ # Wait for main logger thread to terminate, or for us to be terminated while not self._terminate_or_pause() and self.thread_res.is_alive(): self._cond.release() + # Maybe wait for borg instead? self.thread_res.join(JOIN_TIMEOUT) self._cond.acquire() @@ -647,6 +649,11 @@ important=False, initial_reason=None); + if prune: + self.logger.debug("prune scheduled at %s " % prune.start_time.isoformat()) + else: + self.logger.debug("no prune scheduled") + if not prune: return create elif not create: @@ -695,7 +702,7 @@ if important: tm=MonotonicTime.now() else: - tm=self.timeclass.after(standard_interval) + tm=self.timeclass.after_other(self.start_time, standard_interval) if initial_reason: return Operation(optype, tm, reason=initial_reason) else: