mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-30 03:48:00 +00:00
Allow multiple aggregator loops in the core to try and spread feed subscription/send cost out
This commit is contained in:
@@ -36,6 +36,7 @@ impl Default for ServerOpts {
|
||||
pub struct CoreOpts {
|
||||
pub feed_timeout: Option<u64>,
|
||||
pub worker_threads: Option<usize>,
|
||||
pub num_aggregators: Option<usize>,
|
||||
}
|
||||
|
||||
impl Default for CoreOpts {
|
||||
@@ -43,6 +44,7 @@ impl Default for CoreOpts {
|
||||
Self {
|
||||
feed_timeout: None,
|
||||
worker_threads: None,
|
||||
num_aggregators: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,6 +158,9 @@ pub async fn start_server(
|
||||
if let Some(val) = core_opts.worker_threads {
|
||||
core_command = core_command.arg("--worker-threads").arg(val.to_string());
|
||||
}
|
||||
if let Some(val) = core_opts.num_aggregators {
|
||||
core_command = core_command.arg("--num-aggregators").arg(val.to_string());
|
||||
}
|
||||
|
||||
// Start the server
|
||||
Server::start(server::StartOpts::ShardAndCore {
|
||||
|
||||
Reference in New Issue
Block a user