Skip to content

Commit 2d5abca

Browse files
authored
fix: docs about using of write_api batching mode (influxdata#334)
1 parent a0779ab commit 2d5abca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,11 @@ Writes
349349
The `WriteApi <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/write_api.py>`_ supports synchronous, asynchronous and batching writes into InfluxDB 2.0.
350350
The data should be passed as a `InfluxDB Line Protocol <https://docs.influxdata.com/influxdb/latest/write_protocols/line_protocol_tutorial/>`_\ , `Data Point <https://github.com/influxdata/influxdb-client-python/blob/master/influxdb_client/client/write/point.py>`_ or Observable stream.
351351

352-
**Important: The WriteApi in batching mode (default mode) is suppose to run as a singleton. To flush all your data you should wrap the execution using ``with client.write_api(...) as write_api:`` statement or call ``_write_client.close()`` at the end of your script.**
352+
.. warning::
353+
354+
The ``WriteApi`` in batching mode (default mode) is suppose to run as a singleton.
355+
To flush all your data you should wrap the execution using ``with client.write_api(...) as write_api:`` statement
356+
or call ``write_api.close()`` at the end of your script.
353357

354358
*The default instance of WriteApi use batching.*
355359

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy