Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
mvniekerk committed Apr 26, 2024
2 parents 4be048b + 20162d2 commit 9bce734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ impl JobLocked {
/// This is checked if it is running only after 500ms in 500ms intervals.
/// ```rust,ignore
/// let mut sched = JobScheduler::new();
/// let job = Job::new_repeated(Duration::from_secs(8), |_uuid, _lock| Box::pin(async move {
/// let job = Job::new_repeated_async(Duration::from_secs(8), |_uuid, _lock| Box::pin(async move {
/// println!("{:?} I'm repeated every 8 seconds", chrono::Utc::now());
/// }));
/// sched.add(job)
Expand Down
4 changes: 2 additions & 2 deletions src/job_scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use chrono::{DateTime, NaiveDateTime, Utc};
use std::future::Future;
use std::pin::Pin;
use std::sync::Arc;
#[cfg(feature = "signal")]
#[cfg(all(unix, feature = "signal"))]
use tokio::signal::unix::SignalKind;
use tokio::sync::RwLock;
use tracing::{error, info};
Expand Down Expand Up @@ -383,7 +383,7 @@ impl JobsSchedulerLocked {

///
/// Wait for a signal to shut the runtime down with
#[cfg(feature = "signal")]
#[cfg(all(unix, feature = "signal"))]
pub fn shutdown_on_signal(&self, signal: SignalKind) {
let mut l = self.clone();
tokio::spawn(async move {
Expand Down

0 comments on commit 9bce734

Please sign in to comment.