diff --git a/lib/cli/Cargo.toml b/lib/cli/Cargo.toml index 04a25ff516..b8e7f7a675 100644 --- a/lib/cli/Cargo.toml +++ b/lib/cli/Cargo.toml @@ -34,7 +34,7 @@ tracing = "0.1" url = "2.5.2" uuid = "1.10.0" - # Standalone +# Standalone cluster-datacenter-tls-renew = { path = "../../svc/pkg/cluster/standalone/datacenter-tls-renew" } cluster-gc = { path = "../../svc/pkg/cluster/standalone/gc" } cluster-metrics-publish = { path = "../../svc/pkg/cluster/standalone/metrics-publish" } diff --git a/lib/pegboard/v8-isolate-runner/Cargo.toml b/lib/pegboard/v8-isolate-runner/Cargo.toml index 6e3f1d30be..514e1094ae 100644 --- a/lib/pegboard/v8-isolate-runner/Cargo.toml +++ b/lib/pegboard/v8-isolate-runner/Cargo.toml @@ -12,7 +12,6 @@ deno_core = "0.312.0" futures-util = { version = "0.3" } netif = "0.1.6" nix = { version = "0.27", default-features = false, features = ["user", "signal"] } -rand = "0.8" serde = { version = "1.0.195", features = ["derive"] } serde_json = "1.0.111" signal-hook = "0.3.17" diff --git a/lib/pegboard/v8-isolate-runner/src/main.rs b/lib/pegboard/v8-isolate-runner/src/main.rs index 345142b4ca..c43beaf62b 100644 --- a/lib/pegboard/v8-isolate-runner/src/main.rs +++ b/lib/pegboard/v8-isolate-runner/src/main.rs @@ -3,7 +3,6 @@ use std::{collections::HashMap, path::Path, time::Duration}; use anyhow::*; use deno_runtime::deno_core::JsRuntime; use futures_util::{stream::SplitStream, StreamExt}; -use rand::Rng; use tokio::{ fs, net::TcpStream, @@ -132,9 +131,7 @@ async fn handle_connection( break; } - let jitter = - Duration::from_millis(rand::thread_rng().gen_range(0..100)); - tokio::time::sleep(THREAD_STATUS_POLL + jitter).await + tokio::time::sleep(THREAD_STATUS_POLL).await } }); diff --git a/svc/pkg/cluster/standalone/default-update/src/lib.rs b/svc/pkg/cluster/standalone/default-update/src/lib.rs index 043262a6dc..65d0d602cb 100644 --- a/svc/pkg/cluster/standalone/default-update/src/lib.rs +++ b/svc/pkg/cluster/standalone/default-update/src/lib.rs @@ -107,7 +107,7 @@ pub async fn start(use_autoscaler: bool) -> GlobalResult<()> { } #[tracing::instrument] -pub async fn start_inner(use_autoscaler: bool) -> GlobalResult<()> { +async fn start_inner(use_autoscaler: bool) -> GlobalResult<()> { let pools = rivet_pools::from_env().await?; let client = chirp_client::SharedClient::from_env(pools.clone())?.wrap_new("cluster-default-update"); diff --git a/svc/pkg/monolith/standalone/worker/src/lib.rs b/svc/pkg/monolith/standalone/worker/src/lib.rs index a087248451..483482f74d 100644 --- a/svc/pkg/monolith/standalone/worker/src/lib.rs +++ b/svc/pkg/monolith/standalone/worker/src/lib.rs @@ -1,13 +1,5 @@ use rivet_operation::prelude::*; -pub async fn start() -> GlobalResult<()> { - let pools = rivet_pools::from_env().await?; - - run_from_env(pools).await?; - - Ok(()) -} - macro_rules! spawn_workers { ([$shared_client:ident, $pools:ident, $cache:ident, $join_set:ident] $($pkg:ident),* $(,)?) => { $( @@ -21,6 +13,14 @@ macro_rules! spawn_workers { }; } +pub async fn start() -> GlobalResult<()> { + let pools = rivet_pools::from_env().await?; + + run_from_env(pools).await?; + + Ok(()) +} + #[tracing::instrument(skip_all)] pub async fn run_from_env(pools: rivet_pools::Pools) -> GlobalResult<()> { let shared_client = chirp_client::SharedClient::from_env(pools.clone())?;