Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8286f45

Browse filesBrowse files
goznaukbednar
andauthored
fix: prevent creating unnecessary threads repeatedly (influxdata#562)
* fix: prevent creating unnecessary threads repeatedly Use ThreadPoolScheduler for WriteApi batch subject instead of TimeoutScheduler. Fixes influxdata#561 * docs: Update CHANGELOG.md * docs: update CHANGELOG.md --------- Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
1 parent eb5afd1 commit 8286f45
Copy full SHA for 8286f45

File tree

2 files changed

+5
-1
lines changed
Filter options

2 files changed

+5
-1
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## 1.40.0 [unreleased]
22

3+
### Bug Fixes
4+
1. [#562](https://github.com/influxdata/influxdb-client-python/pull/562): Use `ThreadPoolScheduler` for `WriteApi`'s batch subject instead of `TimeoutScheduler` to prevent creating unnecessary threads repeatedly
5+
36
## 1.39.0 [2023-12-05]
47

58
### Features

‎influxdb_client/client/write_api.py

Copy file name to clipboardExpand all lines: influxdb_client/client/write_api.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def __init__(self,
258258
self._disposable = self._subject.pipe(
259259
# Split incoming data to windows by batch_size or flush_interval
260260
ops.window_with_time_or_count(count=write_options.batch_size,
261-
timespan=timedelta(milliseconds=write_options.flush_interval)),
261+
timespan=timedelta(milliseconds=write_options.flush_interval),
262+
scheduler=ThreadPoolScheduler(1)),
262263
# Map window into groups defined by 'organization', 'bucket' and 'precision'
263264
ops.flat_map(lambda window: window.pipe(
264265
# Group window by 'organization', 'bucket' and 'precision'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.