From c3f30430091d1da0f999644f1138ce08224d0279 Mon Sep 17 00:00:00 2001 From: chesedo Date: Fri, 10 Feb 2023 11:32:50 +0200 Subject: [PATCH] refactor: don't sleep on started --- gateway/src/project.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gateway/src/project.rs b/gateway/src/project.rs index 5bab49ea9..e8f6c86cd 100644 --- a/gateway/src/project.rs +++ b/gateway/src/project.rs @@ -19,7 +19,7 @@ use hyper::Client; use once_cell::sync::Lazy; use rand::distributions::{Alphanumeric, DistString}; use serde::{Deserialize, Serialize}; -use tokio::time::{self, sleep, timeout}; +use tokio::time::{sleep, timeout}; use tracing::{debug, error, info, instrument}; use crate::{ @@ -988,8 +988,6 @@ where #[instrument(skip_all)] async fn next(self, ctx: &Ctx) -> Result { - time::sleep(Duration::from_secs(1)).await; - let container = self.container.refresh(ctx).await?; let mut service = match self.service { Some(service) => service, @@ -1533,7 +1531,7 @@ pub mod tests { })) if id == container_id, ); - let delay = time::sleep(Duration::from_secs(10)); + let delay = sleep(Duration::from_secs(10)); futures::pin_mut!(delay); let mut project_readying = project_started .unwrap()