@@ -271,28 +271,24 @@ public final class PostgresJobQueue: JobQueueDriver {
271
271
/// - action Job Action
272
272
public func performAction( jobID: JobID , action: JobAction ) async throws {
273
273
switch action {
274
- case . cancel ( ) :
275
- try await self . performJobAction ( jobID: jobID, status: . cancelled)
276
- case . pause ( ) :
277
- try await self . performJobAction ( jobID: jobID, status: . paused)
278
- case . resume ( ) :
279
- try await self . client. withTransaction ( logger: logger) { connection in
280
- try await self . setStatus ( jobID: jobID, status: . pending, connection: connection)
281
- try await self . addToQueue (
282
- jobID: jobID,
283
- queueName: configuration. queueName,
284
- options: . init( ) ,
285
- connection: connection
286
- )
287
- }
288
- default:
289
- break
274
+ case . cancel ( ) :
275
+ try await self . performJobAction ( jobID: jobID, status: . cancelled)
276
+ case . pause ( ) :
277
+ try await self . performJobAction ( jobID: jobID, status: . paused)
278
+ case . resume ( ) :
279
+ try await self . client. withTransaction ( logger: logger) { connection in
280
+ try await self . setStatus ( jobID: jobID, status: . pending, connection: connection)
281
+ try await self . addToQueue (
282
+ jobID: jobID,
283
+ queueName: configuration. queueName,
284
+ options: . init( ) ,
285
+ connection: connection
286
+ )
287
+ }
288
+ default:
289
+ break
290
290
}
291
291
}
292
-
293
- public func isEmpty( ) async throws -> Bool {
294
- true
295
- }
296
292
297
293
/// This is called to say job has finished processing and it can be deleted
298
294
public func finished( jobID: JobID) async throws {
@@ -518,7 +514,6 @@ public final class PostgresJobQueue: JobQueueDriver {
518
514
519
515
func performJobAction( jobID: JobID , status: Status ) async throws {
520
516
try await self . client. withTransaction ( logger: logger) { connection in
521
-
522
517
try await connection. query (
523
518
"""
524
519
DELETE FROM swift_jobs.queues
0 commit comments