Skip to content

Commit c116ab7

Browse files
committed
Update for retry
1 parent 9c4ae5d commit c116ab7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/JobsPostgres/PostgresJobsQueue.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,12 @@ public final class PostgresJobQueue: JobQueueDriver {
184184

185185
/// Retry a job
186186
/// - Returns: Bool
187-
@discardableResult public func retry(_ id: JobID, buffer: ByteBuffer, options: JobOptions) async throws -> Bool {
187+
public func retry<Parameters>(_ id: JobID, jobRequest: JobRequest<Parameters>, options: JobOptions) async throws {
188+
let buffer = try self.jobRegistry.encode(jobRequest: jobRequest)
188189
try await self.client.withTransaction(logger: self.logger) { connection in
189190
try await self.updateJob(id: id, buffer: buffer, connection: connection)
190-
try await self.addToQueue(jobId: id, connection: connection, delayUntil: options.delayUntil)
191+
try await self.addToQueue(jobID: id, connection: connection, delayUntil: options.delayUntil)
191192
}
192-
return true
193193
}
194194

195195
/// This is called to say job has finished processing and it can be deleted

0 commit comments

Comments
 (0)