diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2017-05-31 13:26:49 +0200 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2017-06-07 11:44:16 +0200 |
| commit | 2ca128667be174fe652d35c54c8e74d5abea151e (patch) | |
| tree | 6eea2484a42a4967470530516503b2b02d84b512 /meta-openstack/recipes-devtools/python/python-glanceclient | |
| parent | 34d600edff2b60905104aecf1cfd7fe59f9aa697 (diff) | |
| download | meta-cloud-services-2ca128667be174fe652d35c54c8e74d5abea151e.tar.gz | |
python-glanceclient: Uprev to 2.5.0
This is used by latest stable/newton
Drop memeroy leak patch, has been fixed in the new version.
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glanceclient')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-glanceclient/fix_glanceclient_memory_leak.patch | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glanceclient/fix_glanceclient_memory_leak.patch b/meta-openstack/recipes-devtools/python/python-glanceclient/fix_glanceclient_memory_leak.patch deleted file mode 100644 index 754d83f..0000000 --- a/meta-openstack/recipes-devtools/python/python-glanceclient/fix_glanceclient_memory_leak.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | --- | ||
| 2 | glanceclient/openstack/common/apiclient/client.py | 10 ++++++++++ | ||
| 3 | 1 file changed, 10 insertions(+) | ||
| 4 | |||
| 5 | --- a/glanceclient/openstack/common/apiclient/client.py | ||
| 6 | +++ b/glanceclient/openstack/common/apiclient/client.py | ||
| 7 | @@ -90,6 +90,7 @@ | ||
| 8 | self.user_agent = user_agent or self.user_agent | ||
| 9 | |||
| 10 | self.times = [] # [("item", starttime, endtime), ...] | ||
| 11 | + self.times_max_len = 200 | ||
| 12 | self.timings = timings | ||
| 13 | |||
| 14 | # requests within the same session can reuse TCP connections from pool | ||
| 15 | @@ -142,6 +143,12 @@ | ||
| 16 | def reset_timings(self): | ||
| 17 | self.times = [] | ||
| 18 | |||
| 19 | + def get_timings_max_len(self): | ||
| 20 | + return self.times_max_len | ||
| 21 | + | ||
| 22 | + def set_timings_max_len(self, new_len): | ||
| 23 | + self.times_max_len = new_len | ||
| 24 | + | ||
| 25 | def request(self, method, url, **kwargs): | ||
| 26 | """Send an http request with the specified characteristics. | ||
| 27 | |||
| 28 | @@ -173,6 +180,9 @@ | ||
| 29 | if self.timings: | ||
| 30 | self.times.append(("%s %s" % (method, url), | ||
| 31 | start_time, time.time())) | ||
| 32 | + # remove oldest items until we maintain max length | ||
| 33 | + while len(self.times) > self.times_max_len: | ||
| 34 | + del self.times[0] | ||
| 35 | self._http_log_resp(resp) | ||
| 36 | |||
| 37 | if resp.status_code >= 400: | ||
