Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golemsp sticks to classic runtimes #1688

Merged
merged 1 commit into from
Nov 19, 2021
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
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