Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 7fae65f

Browse files
committed
set precision and retention policy in GET params
1 parent dae6a8a commit 7fae65f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

influxdb/client.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -390,21 +390,25 @@ def _write_points(self,
390390
'points': points
391391
}
392392

393+
if tags:
394+
data['tags'] = tags
395+
396+
params = {
397+
'db': database or self._database
398+
}
399+
393400
if time_precision:
394-
data['precision'] = time_precision
401+
params['precision'] = time_precision
395402

396403
if retention_policy:
397-
data['retentionPolicy'] = retention_policy
398-
399-
if tags:
400-
data['tags'] = tags
404+
params['rp'] = retention_policy
401405

402406
if self.use_udp:
403407
self.send_packet(data)
404408
else:
405409
self.write(
406410
data=data,
407-
params={'db': database or self._database},
411+
params=params,
408412
expected_response_code=204
409413
)
410414

0 commit comments

Comments
 (0)