panic if influxdb_bucket is not set when influxdb_host is set

This commit is contained in:
Bryan Stitt 2023-06-13 09:14:21 -07:00
parent 45543be256
commit 602b0117c4
2 changed files with 11 additions and 0 deletions

@ -378,12 +378,18 @@ impl Web3ProxyApp {
.influxdb_org
.clone()
.expect("influxdb_org needed when influxdb_host is set");
let influxdb_token = top_config
.app
.influxdb_token
.clone()
.expect("influxdb_token needed when influxdb_host is set");
top_config
.app
.influxdb_bucket
.expect("influxdb_bucket needed when influxdb_host is set");
let influxdb_client =
influxdb2::Client::new(influxdb_host, influxdb_org, influxdb_token);

@ -57,6 +57,11 @@ impl MigrateStatsToV2 {
.clone()
.expect("influxdb_token needed when influxdb_host is set");
top_config
.app
.influxdb_bucket
.expect("influxdb_token needed when influxdb_host is set");
let influxdb_client =
influxdb2::Client::new(influxdb_host, influxdb_org, influxdb_token);