feat: update dependencies
This commit is contained in:
1095
Cargo.lock
generated
1095
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "0.2", features = ["full"] }
|
||||
tokio = { version="1.22", features = ["rt"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
argparse = "0.2"
|
||||
|
||||
@@ -160,9 +160,9 @@ fn keep_runningd(keep_running_config: Arc<KeepRunningConfig>) {
|
||||
|
||||
fn block_send_notify(notify_token: &str, title: &str, fail_count: u64) {
|
||||
use tokio::runtime::Builder;
|
||||
match Builder::new().basic_scheduler().enable_all().build() {
|
||||
match Builder::new_current_thread().enable_all().build() {
|
||||
Err(err) => error!("Prepare tokio runtime error: {}", err),
|
||||
Ok(mut rt) => {
|
||||
Ok(rt) => {
|
||||
let text = format!("Check failed: {}, fail count: {}\ncheck time: {:?}", title, fail_count, Local::now());
|
||||
rt.block_on(send_notify(notify_token, &text));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user