From e09b42797a6208a65feaee834957fe9e55937f4d Mon Sep 17 00:00:00 2001 From: Ryan Tucker Date: Mon, 18 Jan 2010 17:58:44 -0500 Subject: [PATCH] oops, old values for targetspeed/lastblocktargettime are bad --- BackupPC_archiveHost_s3 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BackupPC_archiveHost_s3 b/BackupPC_archiveHost_s3 index a7241a3..c1da7cf 100755 --- a/BackupPC_archiveHost_s3 +++ b/BackupPC_archiveHost_s3 @@ -130,6 +130,8 @@ class SlowFile: if self.delayfactor > 1: # reduce the penalty a bit self.delayfactor -= 0.1 + targetspeed = self.speed/float(self.delayfactor) + self.lastblocktargettime = time.time() + len/float(targetspeed) if self.delayfactor < 1: self.delayfactor = 1 @@ -145,6 +147,7 @@ class SlowFile: self.delayfactor = 1 self.speed = newspeed logger.debug('Setting new speed! %i bytes/second' % newspeed) + self.lastblocktargettime = 0 except IOError: logger.debug('No Semaphore file for new speed') except ValueError: