Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/packages/cluster/AUTOSCALING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Autoscaling

Autoscaling occurs in the `cluster-autoscale` service, which runs every 15 seconds.
The autoscaler service runs every 15 seconds.

## Why memory?

Expand Down
10 changes: 5 additions & 5 deletions lib/util/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ lazy_static::lazy_static! {
.map(|x| serde_json::from_str(&x).expect("failed to parse billing"));
}

pub fn default_cluster_id() -> Uuid {
Uuid::nil()
}

/// Where this code is being written from. This is derived from the `RIVET_RUN_CONTEXT` environment
/// variable.
///
Expand All @@ -63,6 +59,11 @@ pub fn run_context() -> RunContext {
RUN_CONTEXT.clone().expect("RIVET_RUN_CONTEXT")
}

// Cluster id for provisioning servers
pub fn default_cluster_id() -> Uuid {
Uuid::nil()
}

/// The namespace this service is running in. This is derived from the `NAMESPACE` environment
/// variable.
pub fn namespace() -> &'static str {
Expand Down Expand Up @@ -251,7 +252,6 @@ pub fn secret_env_var_key(key: &[impl AsRef<str>]) -> String {

pub fn var(name: impl AsRef<str>) -> Result<String, EnvVarError> {
let env_var = std::env::var(name.as_ref());

match env_var {
Ok(v) => Ok(v),
Err(var_error) => match var_error {
Expand Down
Loading