From e1990e4a6507a86a437924039fece5790c7656d2 Mon Sep 17 00:00:00 2001 From: Jakub Bednar Date: Mon, 12 Aug 2024 14:39:57 +0200 Subject: [PATCH] docs: update CHANGELOG.md --- CHANGELOG.md | 3 +++ examples/import_data_set_multiprocessing.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dab2d69..923317ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 1.46.0 [unreleased] +### Examples: +1. [#664](https://github.com/influxdata/influxdb-client-python/pull/664/): Multiprocessing example uses new source of data + ## 1.45.0 [2024-08-12] ### Bug Fixes diff --git a/examples/import_data_set_multiprocessing.py b/examples/import_data_set_multiprocessing.py index a813fe51..b20b6174 100644 --- a/examples/import_data_set_multiprocessing.py +++ b/examples/import_data_set_multiprocessing.py @@ -114,7 +114,7 @@ def parse_rows(rows, total_size): counter_.value += len(_parsed_rows) if counter_.value % 10_000 == 0: print('{0:8}{1}'.format(counter_.value, ' - {0:.2f} %' - .format(100 * float(progress_.value) / float(int(total_size))) if total_size else "")) + .format(float(progress_.value) / float(int(total_size))) if total_size else "")) pass queue_.put(_parsed_rows) @@ -148,8 +148,9 @@ def init_counter(counter, progress, queue): Open URL and for stream data """ response = urlopen(url) - if response.headers: - content_length = response.headers['Content-length'] + # we can't get content length from response because the gzip stream content length is unknown + # so we set it to this value, just for progress display + content_length = 23143223 """ Open GZIP stream