Skip to content

Commit f0bcadd

Browse files
authored
Merge pull request dmnd-pool#217 from Anshumancanrock/fix/216-reduce-share-batch-interval-180s
feat: Reduce share batch interval to 180s
2 parents 3f391a6 + b8452a7 commit f0bcadd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/monitor/shares.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use crate::{
77
proxy_state::{DownstreamType, ProxyState},
88
};
99

10+
const SHARE_BATCH_INTERVAL_SECS: u64 = 180;
11+
1012
#[derive(serde::Serialize, Clone, Debug)]
1113
pub struct ShareInfo {
1214
worker_name: String,
@@ -91,7 +93,8 @@ impl SharesMonitor {
9193

9294
pub async fn monitor(&self) {
9395
let api = MonitorAPI::new(shares_server_endpoint());
94-
let mut interval = tokio::time::interval(std::time::Duration::from_secs(300)); // 5 minutes
96+
let mut interval =
97+
tokio::time::interval(std::time::Duration::from_secs(SHARE_BATCH_INTERVAL_SECS));
9598

9699
// First tick completes immediately
97100
interval.tick().await;

0 commit comments

Comments
 (0)