Use nanosecond timestamps
This commit is contained in:
parent
fa2542f361
commit
c474999f6a
@ -145,11 +145,11 @@ async fn handle_publish(
|
|||||||
let timestamp = timestamp.unwrap_or_else(|| SystemTime::now()
|
let timestamp = timestamp.unwrap_or_else(|| SystemTime::now()
|
||||||
.duration_since(UNIX_EPOCH)
|
.duration_since(UNIX_EPOCH)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.as_millis()
|
.as_nanos()
|
||||||
);
|
);
|
||||||
|
|
||||||
for database in databases.iter() {
|
for database in databases.iter() {
|
||||||
let mut query = Timestamp::Milliseconds(timestamp)
|
let mut query = Timestamp::Nanoseconds(timestamp)
|
||||||
.into_query(&database.measurement)
|
.into_query(&database.measurement)
|
||||||
.add_field(&field_name, influx_value.clone());
|
.add_field(&field_name, influx_value.clone());
|
||||||
for tag in mapping.tags.iter() {
|
for tag in mapping.tags.iter() {
|
||||||
|
Loading…
Reference in New Issue
Block a user