service-mango-health: add config for snapshot interval (reduce memory pressure) (#906)

This commit is contained in:
Serge Farny 2024-03-07 11:44:46 +01:00 committed by GitHub
parent 5affbb9cee
commit 81f05b32c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
rpc_ws_url = "wss://mango.rpcpool.com/<TOKEN>"
rpc_http_url = "http://mango.rpcpool.com/<TOKEN>"
mango_group = "78b8f4cGCwmZ9ysPFMWLaLTkkaYnUjwMJYStWe5RTSSX"
snapshot_interval_secs = 900
# [postgres]
# connection_string = "$PG_CONNECTION_STRING"

View File

@ -1,6 +1,7 @@
rpc_http_url = "$RPC_HTTP_URL"
rpc_ws_url = "$RPC_WS_URL"
mango_group = "78b8f4cGCwmZ9ysPFMWLaLTkkaYnUjwMJYStWe5RTSSX"
snapshot_interval_secs = 900
[postgres]
connection_string = "$PG_CONNECTION_STRING"

View File

@ -15,6 +15,8 @@ pub struct Configuration {
pub computing_configuration: ComputingConfiguration,
pub logging_configuration: LoggingConfiguration,
pub persistence_configuration: PersistenceConfiguration,
pub snapshot_interval_secs: u64,
}
#[derive(Clone, Debug, Deserialize)]

View File

@ -198,7 +198,7 @@ impl DataProcessor {
mango_group,
get_multiple_accounts_count: 100,
parallel_rpc_requests: 10,
snapshot_interval: Duration::from_secs(5 * 60),
snapshot_interval: Duration::from_secs(configuration.snapshot_interval_secs),
min_slot: first_websocket_slot + 10,
},
mango_oracles,