From f556bea69bbf3a6630f1194e6a36dc7346b56d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Fri, 1 Dec 2023 00:43:31 +0100 Subject: [PATCH] fix: Use the type alias I defined --- hook-common/src/pgqueue.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 {