1pub mod admin;
2pub mod cron;
3pub mod error;
4pub mod insert;
5pub mod job;
6pub mod kind;
7pub mod migrations;
8pub mod unique;
9
10pub use admin::{
12 CallbackConfig, DefaultAction, ListJobsFilter, QueueRuntimeConfigSnapshot, QueueRuntimeMode,
13 QueueRuntimeSnapshot, QueueRuntimeSummary, QueueStats, RateLimitSnapshot, ResolveOutcome,
14 RuntimeInstance, RuntimeOverview, RuntimeSnapshotInput, StateTimeseriesBucket,
15};
16pub use cron::{CronJobRow, PeriodicJob, PeriodicJobBuilder};
17pub use error::AwaError;
18pub use insert::{insert, insert_many, insert_many_copy, insert_many_copy_from_pool, insert_with};
19pub use job::{InsertOpts, InsertParams, JobRow, JobState, UniqueOpts};
20
21pub use awa_macros::JobArgs;
23
24pub trait JobArgs: serde::Serialize {
30 fn kind() -> &'static str
32 where
33 Self: Sized;
34
35 fn kind_str(&self) -> &'static str
37 where
38 Self: Sized,
39 {
40 Self::kind()
41 }
42
43 fn to_args(&self) -> Result<serde_json::Value, serde_json::Error> {
45 serde_json::to_value(self)
46 }
47}