Skip to content

Commit

Permalink
* S3/S3.py: Introduce throttling on upload only after
Browse files Browse the repository at this point in the history
	  second failure. I.e. first retry at full speed.


git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@397 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information
ludvigm committed Oct 6, 2009
1 parent 6ba0a82 commit 293a02b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
@@ -1,5 +1,7 @@
2009-10-06 Michal Ludvig <mludvig@logix.net.nz>

* S3/S3.py: Introduce throttling on upload only after
second failure. I.e. first retry at full speed.
* TODO: Updated with new ideas.

2009-06-02 Michal Ludvig <michal@logix.cz>
Expand Down
3 changes: 2 additions & 1 deletion S3/S3.py
Expand Up @@ -504,7 +504,8 @@ def send_file(self, request, file, labels, throttle = 0, retries = _max_retries)
if self.config.progress_meter:
progress.done("failed")
if retries:
throttle = throttle and throttle * 5 or 0.01
if retries < _max_retries:
throttle = throttle and throttle * 5 or 0.01
warning("Upload failed: %s (%s)" % (resource['uri'], e))
warning("Retrying on lower speed (throttle=%0.2f)" % throttle)
warning("Waiting %d sec..." % self._fail_wait(retries))
Expand Down

0 comments on commit 293a02b

Please sign in to comment.