Skip to content

Commit

Permalink
fix: sleep the main thread because chromedriver may take a while
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomio committed May 10, 2022
1 parent 2089736 commit 8eb74f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Expand Up @@ -4,6 +4,8 @@
extern crate tracing;

use std::process::Stdio;
use std::time::Duration;
use std::thread;
use std::sync::Arc;
use std::{env, fs};

Expand Down Expand Up @@ -59,6 +61,9 @@ async fn main() -> anyhow::Result<()> {
}
});

// Chromedriver may take a while to start
thread::sleep(Duration::from_secs(3));

let mut capabilities = Map::new();
let chrome_opts = match env::var("GOOGLE_CHROME_PATH") {
Ok(path) => serde_json::json!({
Expand Down

0 comments on commit 8eb74f9

Please sign in to comment.