diff --git a/config/config.toml b/config/config.toml index cfe5f4c..ae92b87 100644 --- a/config/config.toml +++ b/config/config.toml @@ -87,7 +87,7 @@ key_store.mapping_key = "RelevantOracleMappingAddress" # Wait at least this long before publishing an unchanged price # state; unchanged price state means only timestamp has changed # with other state identical to last published state. -# exporter.unchanged_publish_threshold = "5s" +# exporter.unchanged_publish_threshold = "3s" # Maximum size of a batch # exporter.max_batch_size = 12 diff --git a/src/agent/services/exporter.rs b/src/agent/services/exporter.rs index 1e6aadd..b65d580 100644 --- a/src/agent/services/exporter.rs +++ b/src/agent/services/exporter.rs @@ -46,6 +46,7 @@ pub struct Config { /// Wait at least this long before publishing an unchanged price /// state; unchanged price state means only timestamp has changed /// with other state identical to last published state. + #[serde(with = "humantime_serde")] pub unchanged_publish_threshold: Duration, /// Maximum size of a batch pub max_batch_size: usize, @@ -80,7 +81,7 @@ impl Default for Config { refresh_network_state_interval_duration: Duration::from_millis(200), publish_interval_duration: Duration::from_secs(1), staleness_threshold: Duration::from_secs(5), - unchanged_publish_threshold: Duration::from_secs(5), + unchanged_publish_threshold: Duration::from_secs(3), max_batch_size: 12, inflight_transactions_channel_capacity: 10000, transaction_monitor: Default::default(),