From 14c66252e92cd8ec5a0f24056872fe507b6893f1 Mon Sep 17 00:00:00 2001 From: Eduardo Lemos Date: Fri, 14 Jun 2024 10:29:49 -0300 Subject: [PATCH] refac requested changes --- proto/src/worker/runner.rs | 6 +++--- worker/src/main.rs | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/proto/src/worker/runner.rs b/proto/src/worker/runner.rs index 8c07eb2..08e03c0 100644 --- a/proto/src/worker/runner.rs +++ b/proto/src/worker/runner.rs @@ -12,17 +12,17 @@ use crate::common::instance::{InstanceId, InstanceSpec}; /// Starts a new deploy in the system #[derive(Debug, Serialize, Deserialize)] pub struct DeployInstanceReq { - pub id: DeoployReqId, + pub id: DeployReqId, pub instance_spec: InstanceSpec, } #[derive(Debug, Serialize, Deserialize)] pub struct DeployInstanceRes { - pub id: DeoployReqId, + pub id: DeployReqId, } #[derive(Debug, Serialize, Deserialize)] -pub struct DeoployReqId(Uuid); +pub struct DeployReqId(Uuid); /// Starts a new deploy in the system. #[derive(Debug, Serialize, Deserialize)] diff --git a/worker/src/main.rs b/worker/src/main.rs index d93fc30..8ff18c7 100644 --- a/worker/src/main.rs +++ b/worker/src/main.rs @@ -16,13 +16,12 @@ mod runner; async fn main() -> Result<()> { setup::tracing(); - let args = Arc::new(WorkerArgs::parse()); + let args = WorkerArgs::parse(); info!(?args, "started worker"); let pusher_handle = tokio::spawn({ - let args = Arc::clone(&args); async move { - pusher::start_pusher(args).await; + pusher::start_pusher(Arc::new(args)).await; } });