//! # RunAt - Distributed Job Scheduler
//!
//! A distributed job scheduler for Rust
//!
//! ## Example
//!
//! ```rust,ignore
//! use runat::{Job, JobScheduler, JobContext};
//!
//! #[derive(Job)]
//! struct EmailJob {
//!     to: String,
//!     subject: String,
//!     body: String,
//! }
//!
//! #[async_trait::async_trait]
//! impl JobHandler for EmailJob {
//!     async fn handle(&self, ctx: JobContext) -> anyhow::Result<()> {
//!         // Send email logic here
//!         Ok(())
//!     }
//! }
//! ```

pub mod datastore;
pub mod error;
pub mod queue;
pub mod job;
pub mod registry;

pub use datastore::Datastore;
pub use error::{Error, JobResult};
pub use job::{BackgroundJob, Executable, Job, JobStatus, JobSchedule, Retry, RetryStrategy};
pub use queue::{JobQueue, JobQueueConfig, JobWorker};
pub use registry::{JobHandler, JobRegistry, JOB_REGISTRY, register_handler};

#[cfg(feature = "postgres")]
pub use datastore::PostgresDatastore;

pub use runat_macros::{BackgroundJob, job};

// Reexport once_cell and dashmap
pub use once_cell;