Skip to content

Commit

Permalink
bumped version to 2.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
AH-dark committed Nov 17, 2024
1 parent d2c1956 commit d86ab7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .idea/distributed-scheduler.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/cron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ where
pub async fn add_async_job<F, Fut>(&self, job_name: &str, schedule: Schedule, run: F) -> Result<(), Error>
where
F: 'static + Sync + Send + Fn() -> Fut,
Fut: Future<Output=Result<(), Box<dyn std::error::Error>>> + Send,
Fut: Future<Output=()> + Send,
{
let run = Arc::new(run);

Expand All @@ -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;
}
});
}
Expand Down

0 comments on commit d86ab7f

Please sign in to comment.