Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ let package = Package(
.library(name: "JobsPostgres", targets: ["JobsPostgres"])
],
dependencies: [
// TODO: use a released version of swift-jobs
.package(url: "https://github.com/hummingbird-project/swift-jobs.git", from: "1.0.0-rc"),
.package(url: "https://github.com/hummingbird-project/postgres-migrations.git", from: "1.0.0-rc"),
.package(url: "https://github.com/hummingbird-project/swift-jobs.git", from: "1.0.0"),
.package(url: "https://github.com/hummingbird-project/postgres-migrations.git", from: "1.0.0"),
.package(url: "https://github.com/vapor/postgres-nio.git", from: "1.25.0"),
],
targets: [
Expand Down
12 changes: 6 additions & 6 deletions Tests/JobsPostgresTests/JobsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -714,19 +714,19 @@ struct JobsTests {
try await withThrowingTaskGroup(of: Void.self) { group in
let serviceGroup = ServiceGroup(services: [queue.processor()], logger: queue.logger)

let processingJobs = try await jobQueue.queue.getJobs(withStatus: .pending)
#expect(processingJobs.count == 1)

group.addTask {
try await serviceGroup.run()
}
let pendingJobs = try await jobQueue.queue.getJobs(withStatus: .pending)
#expect(pendingJobs.count == 1)

let processingJobCount = try await jobQueue.queue.getJobs(withStatus: .processing)
#expect(processingJobCount.count == 0)

let pausedJobs = try await jobQueue.queue.getJobs(withStatus: .paused)
#expect(pausedJobs.count == 1)

group.addTask {
try await serviceGroup.run()
}

try await jobQueue.resumeJob(jobID: resumableJob)

try await expectation.wait(count: 2)
Expand Down