Skip to content

Commit

Permalink
fix(backend-api): Use "wasm32-unknown-unknown" in #cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo committed Jul 11, 2024
1 parent 5dcc9f8 commit 17b7758
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/backend-api/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ impl WasmerClient {
}

pub fn new(graphql_endpoint: Url, user_agent: &str) -> Result<Self, anyhow::Error> {
#[cfg(all(target_family = "wasm", not(target = "wasm32-wasmer-wasi")))]
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
let client = reqwest::Client::builder()
.build()
.context("could not construct http client")?;

#[cfg(any(not(target_family = "wasm"), target = "wasm32-wasmer-wasi"))]
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
let client = reqwest::Client::builder()
.connect_timeout(Duration::from_secs(10))
.timeout(Duration::from_secs(90))
Expand Down
5 changes: 3 additions & 2 deletions lib/backend-api/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1350,9 +1350,10 @@ fn get_app_logs(
* [TODO]: The resolution here should be configurable.
*/

#[cfg(all(target_family = "wasm", not(target = "wasm32-wasmer-wasi")))]
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
std::thread::sleep(Duration::from_secs(1));
#[cfg(any(not(target_family = "wasm"), target = "wasm32-wasmer-wasi"))]

#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
tokio::time::sleep(Duration::from_secs(1)).await;

continue;
Expand Down

0 comments on commit 17b7758

Please sign in to comment.