File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -267,11 +267,17 @@ public final class PostgresJobQueue: JobQueueDriver {
267
267
)
268
268
269
269
do {
270
- try await self . setStatus ( jobID: jobID, status: . processing, connection: connection)
271
- // if failed to find a job in the job table try getting another index
272
270
guard let buffer = try await stream2. decode ( ByteBuffer . self, context: . default) . first ( where: { _ in true } ) else {
271
+ logger. error (
272
+ " Failed to job with id " ,
273
+ metadata: [
274
+ " JobID " : " \( jobID) "
275
+ ]
276
+ )
277
+ // if failed to find a job in the job table try getting another index
273
278
continue
274
279
}
280
+ try await self . setStatus ( jobID: jobID, status: . processing, connection: connection)
275
281
do {
276
282
let jobInstance = try self . jobRegistry. decode ( buffer)
277
283
return Result . success ( . init( id: jobID, result: . success( jobInstance) ) )
You can’t perform that action at this time.
0 commit comments