Skip to content

Commit

Permalink
SystemTime appears non-linear on MaxOS?
Browse files Browse the repository at this point in the history
  • Loading branch information
bittrance committed Sep 30, 2023
1 parent 86c0b56 commit 9d7680c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/task/scheduled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl<W: Workload + Clone + Send + 'static> ScheduledTask<W> {
}

pub fn is_eligible(&self) -> bool {
self.worker.is_none() && self.state.next_run < SystemTime::now()
self.worker.is_none() && SystemTime::now() >= self.state.next_run
}

pub fn is_running(&self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src/testutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl Workload for TestWorkload {
}

fn interval(&self) -> Duration {
Duration::from_millis(25)
Duration::from_secs(1)
}

fn work(&self, _workdir: PathBuf, _current_sha: ObjectId) -> Result<ObjectId, GitOpsError> {
Expand Down

0 comments on commit 9d7680c

Please sign in to comment.