Skip to main content

parse_max_temp_directory_mb

Function parse_max_temp_directory_mb 

Source
pub fn parse_max_temp_directory_mb(
    var: Result<String, VarError>,
) -> Result<Option<u64>, Error>
Expand description

Parses the raw MICROMEGAS_DATAFUSION_MAX_TEMP_DIRECTORY_MB value (as returned by std::env::var) into an optional MB budget: Ok(None) when the variable is unset, Err when it is set to something that doesn’t parse as u64. Factored out of make_runtime_env so the parse-failure path can be unit-tested without setting a real process env var, which would race with other tests running in parallel in the same process.