diff --git a/hook-common/src/pgqueue.rs b/hook-common/src/pgqueue.rs index 8bb40e1..aa32cb2 100644 --- a/hook-common/src/pgqueue.rs +++ b/hook-common/src/pgqueue.rs @@ -74,7 +74,16 @@ pub struct Job { /// The current status of the job. pub status: JobStatus, /// Arbitrary job parameters stored as JSON. - pub parameters: sqlx::types::Json, + pub parameters: JobParameters, +} + +/// A NewJob to be enqueued into a PgQueue. +pub struct RetryableJob { + pub attempt: i32, + pub finished_at: Option>, + pub started_at: Option>, + pub status: JobStatus, + pub parameters: JobParameters, } /// A NewJob to be enqueued into a PgQueue. @@ -83,7 +92,7 @@ pub struct NewJob { pub finished_at: Option>, pub started_at: Option>, pub status: JobStatus, - pub parameters: sqlx::types::Json, + pub parameters: JobParameters, } impl NewJob {