File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,11 @@ public final class PostgresJobQueue: JobQueueDriver {
173
173
}
174
174
}
175
175
176
- @discardableResult public func update( _ id: JobID , buffer: ByteBuffer , options: JobOptions ) async throws -> Bool {
176
+ /// Retry a job
177
+ /// - Returns: Bool
178
+ @discardableResult public func retry( _ id: JobID , buffer: ByteBuffer , options: JobOptions ) async throws -> Bool {
177
179
try await self . client. withTransaction ( logger: self . logger) { connection in
178
- try await self . update ( id: id, buffer: buffer, connection: connection)
180
+ try await self . updateJob ( id: id, buffer: buffer, connection: connection)
179
181
try await self . updateQueue ( jobId: id, connection: connection, delayUntil: options. delayUntil)
180
182
}
181
183
return true
@@ -303,8 +305,8 @@ public final class PostgresJobQueue: JobQueueDriver {
303
305
logger: self . logger
304
306
)
305
307
}
306
- /// TODO maybe add a new column colum for attempt so far after PR https://github.com/hummingbird-project/swift-jobs/pull/63 is merged?
307
- func update ( id: JobID , buffer: ByteBuffer , connection: PostgresConnection ) async throws {
308
+ // TODO: maybe add a new column colum for attempt so far after PR https://github.com/hummingbird-project/swift-jobs/pull/63 is merged?
309
+ func updateJob ( id: JobID , buffer: ByteBuffer , connection: PostgresConnection ) async throws {
308
310
try await connection. query (
309
311
"""
310
312
UPDATE _hb_pg_jobs
You can’t perform that action at this time.
0 commit comments