Skip to content

Commit 2d5abca

Browse files
authored
fix: docs about using of write_api batching mode (#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)