Skip to content

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

Lines changed: 10 additions & 6 deletions
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)
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