Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing humantime attribute to config and change default to 3s #142

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/agent/services/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
Expand Down
Loading