Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions influxdata-plugin-utils/src/influxdata_plugin_utils/write.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ def write_data(
attempts = max(retries, 0) + 1

if no_sync is None:
if database:
if database is not None:
write_fn = partial(influxdb3_local.write_to_db, database)
else:
write_fn = influxdb3_local.write
elif database:
elif database is not None:
write_fn = partial(influxdb3_local.write_sync_to_db, database, no_sync=no_sync)
else:
write_fn = partial(influxdb3_local.write_sync, no_sync=no_sync)
Expand All @@ -210,4 +210,4 @@ def write_data(
if attempt == attempts - 1:
raise
delay = (2**attempt) * base_delay + random.uniform(0, base_delay)
time.sleep(delay)
time.sleep(delay)