Add tokio-compat-02 for influxdb client

The HTTP client the influxdb client uses is still on tokio 0.2.
This commit is contained in:
2021-08-29 00:55:48 -07:00
parent 525b5152ef
commit 7940d168fe
3 changed files with 31 additions and 0 deletions

View File

@ -153,9 +153,12 @@ async fn handle_publish(
};
query = query.add_tag(&tag.0, value);
}
use tokio_compat_02::FutureExt;
database
.client
.query(&query)
.compat()
.await
.map_err(|err| format!("Failed to write to DB: {}", err))?;
debug!("wrote to influx: {:?}", query);