Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 9 additions & 44 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ anyhow = { workspace = true }

[workspace.dependencies]

es-entity = "0.10.27"
es-entity = "0.10.28"

anyhow = "1.0"
async-trait = "0.1"
Expand All @@ -52,7 +52,7 @@ tracing = { version = "0.1" }
sqlx = { version = "0.8", features = ["macros", "runtime-tokio-rustls", "postgres", "uuid", "chrono", "json" ] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_with = "3.14"
serde_with = "3.18"
thiserror = "2.0"
tokio = { version = "1.50", features = ["rt-multi-thread", "macros"] }
uuid = { version = "1.22", features = ["serde", "v7"] }
Expand Down
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@
//! inject an artificial clock via [`JobSvcConfig::clock`]:
//!
//! ```ignore
//! use job::{JobSvcConfig, ClockHandle, ArtificialClockConfig};
//! use job::{JobSvcConfig, ClockHandle};
//!
//! let (clock, controller) = ClockHandle::artificial(ArtificialClockConfig::manual());
//! let (clock, controller) = ClockHandle::manual();
//! let config = JobSvcConfig::builder()
//! .pool(pool)
//! .clock(clock)
Expand Down Expand Up @@ -229,9 +229,7 @@ use std::sync::{Arc, Mutex};
pub use config::*;
pub use current::*;
pub use entity::{Job, JobTerminalState, JobType};
pub use es_entity::clock::{
ArtificialClockConfig, ArtificialMode, Clock, ClockController, ClockHandle,
};
pub use es_entity::clock::{Clock, ClockController, ClockHandle};
pub use migrate::*;
pub use registry::*;
pub use runner::*;
Expand Down
9 changes: 4 additions & 5 deletions tests/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ mod helpers;
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use job::{
ArtificialClockConfig, ClockHandle, CurrentJob, Job, JobCompletion, JobId, JobInitializer,
JobRunner, JobSpawner, JobSpec, JobSvcConfig, JobTerminalState, JobType, Jobs, RetrySettings,
error::JobError,
ClockHandle, CurrentJob, Job, JobCompletion, JobId, JobInitializer, JobRunner, JobSpawner,
JobSpec, JobSvcConfig, JobTerminalState, JobType, Jobs, RetrySettings, error::JobError,
};
use serde::{Deserialize, Serialize};
use std::sync::Arc;
Expand Down Expand Up @@ -150,8 +149,8 @@ impl JobRunner for ScheduledJobRunner {
async fn test_scheduled_job_with_artificial_clock() -> anyhow::Result<()> {
let pool = helpers::init_pool().await?;

// Create an artificial clock for deterministic testing
let (clock, controller) = ClockHandle::artificial(ArtificialClockConfig::manual());
// Create a manual clock for deterministic testing
let (clock, controller) = ClockHandle::manual();
let initial_time = clock.now();

let config = JobSvcConfig::builder()
Expand Down
Loading