|
|
|
@ -42,12 +42,17 @@ async fn main() -> Result<(), Box<dyn std::error::Error>>
|
|
|
|
|
let conf = match parse_args() {
|
|
|
|
|
Ok(v) => v,
|
|
|
|
|
Err(e) => {
|
|
|
|
|
println!("Failed to parse args: {}", e);
|
|
|
|
|
eprintln!("Failed to parse args: {}", e);
|
|
|
|
|
std::process::exit(1)
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
work_async::work(conf).await
|
|
|
|
|
if let Err(e) = work_async::work(conf).await {
|
|
|
|
|
eprintln!("Worker error: {}", e);
|
|
|
|
|
std::process::exit(1)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(not(feature="async"))]
|
|
|
|
|