wip
This commit is contained in:
@@ -2,7 +2,7 @@ use std::{sync::Arc, time::Duration};
|
||||
use async_trait::async_trait;
|
||||
use async_mutex::Mutex;
|
||||
use headless_chrome::{Browser, LaunchOptions};
|
||||
use tracing::{error, info, debug, trace, warn};
|
||||
use tracing::{error, info, debug, trace, warn, trace_span};
|
||||
use rocket::{fairing::{Fairing, self}, Rocket, Build, Request, request::{FromRequest, Outcome}, futures::pin_mut, http::Status};
|
||||
use tokio::time::sleep;
|
||||
|
||||
@@ -55,10 +55,12 @@ impl ChromiumCoordinator {
|
||||
}
|
||||
|
||||
fn create_browser_instance() -> BrowserHolder {
|
||||
BrowserHolder { browser: Browser::new(LaunchOptions {
|
||||
idle_browser_timeout: Duration::MAX, // Wait inifinity for commands
|
||||
..LaunchOptions::default()
|
||||
}).unwrap() }
|
||||
trace_span!("Creating Chromium instance").in_scope(|| {
|
||||
BrowserHolder { browser: Browser::new(LaunchOptions {
|
||||
idle_browser_timeout: Duration::MAX, // Wait inifinity for commands
|
||||
..LaunchOptions::default()
|
||||
}).unwrap() }
|
||||
})
|
||||
}
|
||||
|
||||
fn spawn_browser(&self) {
|
||||
|
||||
Reference in New Issue
Block a user