Skip to content

Commit

Permalink
add config var for free disk space goal
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Jun 19, 2023
1 parent 184a00d commit 70771d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub struct Config {

// some caches do automatic cleanup based on this free disk space goal.
// Value shoudl be between 0 and 1.
pub(crate) free_disk_space_goal: float,
pub(crate) free_disk_space_goal: f32,

// Build params
pub(crate) build_attempts: u16,
Expand Down Expand Up @@ -134,6 +134,8 @@ impl Config {
let prefix: PathBuf = require_env("DOCSRS_PREFIX")?;

Ok(Self {
free_disk_space_goal: env("DOCSRS_FREE_DISK_SPACE_GOAL", 0.2)?,

build_attempts: env("DOCSRS_BUILD_ATTEMPTS", 5)?,
use_build_artifact_cache: env("DOCSRS_USE_BUILD_ARTIFACT_CACHE", true)?,

Expand Down

0 comments on commit 70771d5

Please sign in to comment.