diff --git a/ChangeLog b/ChangeLog index 08d1a85..ac15b5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2009-10-06 Michal Ludvig + * 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 diff --git a/S3/S3.py b/S3/S3.py index 950d5ed..f3c9632 100644 --- a/S3/S3.py +++ b/S3/S3.py @@ -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))