@@ -271,28 +271,24 @@ public final class PostgresJobQueue: JobQueueDriver {
271271 /// - action Job Action
272272 public func performAction( jobID: JobID , action: JobAction ) async throws {
273273 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
290290 }
291291 }
292-
293- public func isEmpty( ) async throws -> Bool {
294- true
295- }
296292
297293 /// This is called to say job has finished processing and it can be deleted
298294 public func finished( jobID: JobID) async throws {
@@ -518,7 +514,6 @@ public final class PostgresJobQueue: JobQueueDriver {
518514
519515 func performJobAction( jobID: JobID , status: Status ) async throws {
520516 try await self . client. withTransaction ( logger: logger) { connection in
521-
522517 try await connection. query (
523518 """
524519 DELETE FROM swift_jobs.queues
0 commit comments