Skip to content

Commit

Permalink
refactor: don't sleep on started
Browse files Browse the repository at this point in the history
  • Loading branch information
chesedo committed Feb 10, 2023
1 parent c190337 commit c3f3043
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gateway/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -988,8 +988,6 @@ where

#[instrument(skip_all)]
async fn next(self, ctx: &Ctx) -> Result<Self::Next, Self::Error> {
time::sleep(Duration::from_secs(1)).await;

let container = self.container.refresh(ctx).await?;
let mut service = match self.service {
Some(service) => service,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit c3f3043

Please sign in to comment.