From d86ab7f798bd35d05d02f407136e0016697eb29e Mon Sep 17 00:00:00 2001 From: AH-dark Date: Sun, 17 Nov 2024 22:57:58 +0800 Subject: [PATCH] bumped version to 2.1.5 --- .idea/distributed-scheduler.iml | 1 + Cargo.toml | 2 +- src/cron.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.idea/distributed-scheduler.iml b/.idea/distributed-scheduler.iml index 8ab7950..1aec947 100644 --- a/.idea/distributed-scheduler.iml +++ b/.idea/distributed-scheduler.iml @@ -7,6 +7,7 @@ + diff --git a/Cargo.toml b/Cargo.toml index 0b8ef57..2670d21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "distributed-scheduler" description = "A distributed cronjob library" keywords = ["distributed", "scheduler", "cronjob", "consistent-hashing"] -version = "2.1.4" +version = "2.1.5" edition = "2021" repository = "https://github.com/AH-dark/distributed-scheduler.git" homepage = "https://github.com/AH-dark/distributed-scheduler" diff --git a/src/cron.rs b/src/cron.rs index e87e423..db81831 100644 --- a/src/cron.rs +++ b/src/cron.rs @@ -115,7 +115,7 @@ where pub async fn add_async_job(&self, job_name: &str, schedule: Schedule, run: F) -> Result<(), Error> where F: 'static + Sync + Send + Fn() -> Fut, - Fut: Future>> + Send, + Fut: Future + Send, { let run = Arc::new(run); @@ -135,7 +135,7 @@ where if np.check_job_available(&job_name) .await .is_ok_and(|is_this_node| is_this_node) { - run().await.expect("Failed to run async job, runtime error"); + run().await; } }); }