Skip to content

Commit

Permalink
golemsp sticks to classic runtimes (#1688)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiivan authored Nov 19, 2021
1 parent f1cf5d5 commit f3175e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions golem_cli/src/command/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ pub use ya_provider::GlobalsState as ProviderConfig;

use crate::setup::RunConfig;

const CLASSIC_RUNTIMES: &'static [&'static str] = &["wasm", "vw"];

pub struct YaProviderCommand {
pub(super) cmd: Command,
}
Expand Down Expand Up @@ -159,7 +161,7 @@ impl YaProviderCommand {
self.exec_no_output().await
}

pub async fn update_all_presets(
pub async fn update_classic_presets(
mut self,
starting_fee: Option<f64>,
env_per_sec: Option<f64>,
Expand All @@ -177,7 +179,9 @@ impl YaProviderCommand {
if let Some(initial) = starting_fee {
cmd.arg("--price").arg(format!("Init price={}", initial));
}
cmd.arg("--all");
for runtime_name in CLASSIC_RUNTIMES {
cmd.arg(format!("--name {}", runtime_name));
}
self.exec_no_output().await
}

Expand Down
2 changes: 1 addition & 1 deletion golem_cli/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub async fn run(settings: Settings) -> Result</*exit code*/ i32> {
|| settings.cpu_per_hour.is_some()
{
cmd.ya_provider()?
.update_all_presets(
.update_classic_presets(
settings.starting_fee,
settings.env_per_hour.map(|p| p / 3600.0),
settings.cpu_per_hour.map(|p| p / 3600.0),
Expand Down

0 comments on commit f3175e6

Please sign in to comment.