Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
fix: Use the type alias I defined
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Nov 30, 2023
1 parent c6ab642 commit f556bea
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions hook-common/src/pgqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ pub struct Job<J> {
/// The current status of the job.
pub status: JobStatus,
/// Arbitrary job parameters stored as JSON.
pub parameters: sqlx::types::Json<J>,
pub parameters: JobParameters<J>,
}

/// A NewJob to be enqueued into a PgQueue.
pub struct RetryableJob<J> {
pub attempt: i32,
pub finished_at: Option<DateTime<Utc>>,
pub started_at: Option<DateTime<Utc>>,
pub status: JobStatus,
pub parameters: JobParameters<J>,
}

/// A NewJob to be enqueued into a PgQueue.
Expand All @@ -83,7 +92,7 @@ pub struct NewJob<J> {
pub finished_at: Option<DateTime<Utc>>,
pub started_at: Option<DateTime<Utc>>,
pub status: JobStatus,
pub parameters: sqlx::types::Json<J>,
pub parameters: JobParameters<J>,
}

impl<J> NewJob<J> {
Expand Down

0 comments on commit f556bea

Please sign in to comment.