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

exe-unit: fix counters #3326

Merged
merged 1 commit into from
Sep 24, 2024
Merged
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
7 changes: 2 additions & 5 deletions exe-unit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use anyhow::{bail, Context};
use std::convert::TryFrom;
use std::path::PathBuf;
use structopt::clap;
use ya_counters::service::CountersServiceBuilder;

use ya_client_model::activity::ExeScriptCommand;
use ya_core_model::activity;
Expand Down Expand Up @@ -369,12 +368,10 @@ pub async fn exe_unit(mut config: ExeUnitConfig) -> anyhow::Result<Addr<ExeUnit<

log::debug!("ExeUnitContext args: {:?}", ctx);

let metrics = CountersServiceBuilder::new(ctx.agreement.usage_vector.clone(), Some(1000))
.build()
.start();
let counters = service::counters::build(&ctx, Some(1000), ctx.supervise.hardware).start();
let transfers = TransferService::new((&ctx).into()).start();
let runtime = RuntimeProcess::new(&ctx, config.binary).start();
let exe_unit = ExeUnit::new(ctx, metrics, transfers, runtime).start();
let exe_unit = ExeUnit::new(ctx, counters, transfers, runtime).start();
let signals = SignalMonitor::new(exe_unit.clone()).start();
exe_unit.send(Register(signals)).await?;

Expand Down
Loading