1

This is my code:

write_api = client.write_api(write_options=ASYNCHRONOUS)
write_api.write(bucket, org, data, write_precision=WritePrecision.US)

1 - How can I detect writing errors?

2 - Should I initialize write_api each time I want to write or I can initialize it once and use the same object all the time?

Rony Tesler
  • 1,207
  • 15
  • 25

1 Answers1

0
callback = write_api.write(bucket, org, data, write_precision=WritePrecision.US)
callback.wait()
callback.get()

Is the only way I found. Unfortunately the wait basically makes it synchronous decreasing the performance.

Pavel Lisiza
  • 101
  • 2
  • 4