From e74e89ede14b516c87106883e5e0d93d5df627bc Mon Sep 17 00:00:00 2001 From: Ryan Tucker Date: Sat, 24 Sep 2011 18:18:18 -0400 Subject: [PATCH] unlink_worker: don't verify the remote file send_file does this now, and odds are good that if it verified once, it's going to verify a second time... --- BackupPC_archiveHost_s3 | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/BackupPC_archiveHost_s3 b/BackupPC_archiveHost_s3 index 4872417..cd081f4 100755 --- a/BackupPC_archiveHost_s3 +++ b/BackupPC_archiveHost_s3 @@ -188,22 +188,8 @@ def unlink_worker(in_q, accesskey, sharedkey, host): bucket = open_s3(accesskey, sharedkey, host) for filename in iter(in_q.get, 'STOP'): counter += 1 - retry_count = 0 - max_retries = 3 - done = False - while retry_count <= max_retries and not done: - if verify_file(bucket, filename): - logger.debug("unlink_worker: deleting %s", filename) - os.unlink(filename) - done = True - else: - retry_count += 1 - sleeptime = 2**retry_count - logger.error("unlink_worker: verify_file on %s returned false, retrying in %i seconds (%i/%i)", filename, sleeptime, retry_count, max_retries) - time.sleep(sleeptime) - - if not done: - logger.error("unlink_worker: could not verify remote %s in %i retries", filename, retry_count) + logger.debug("unlink_worker: deleting %s", filename) + os.unlink(filename) logger.debug("unlink_worker: queue is empty, terminating after %i items in %i seconds", counter, time.time() - start_time) time.sleep(5) # settle