Releases: vapor/queues
Release list
Queues 1.0.0
Docs:
https://docs.vapor.codes/4.0/queues/
More information on Vapor 4 official release:
https://forums.swift.org/t/vapor-4-official-release-begins/34802
Improve logging + XCTQueues
This patch was authored by @madsodgaard and released by @mcdappdev.
- Added increased logging metadata.
XCTQueueswas added to support in-memory queue driver to use for mocking.
You can use the in-memory test driver like so:
app.queues.use(.test)Accessing the test queue in tests is like so:
import XCTQueues
let job = app.queues.test.first(Foo.self)
XCTAssert(app.queues.test.contains(Foo.self))Release Candidate 1
-
Renames the package from
jobstoqueues. All types except forJob,ScheduledJob,JobData, andJobIdentifierhave been renamed toQueue*. -
Updates to Swift 5.2 and macOS 10.15.
Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.
Use Same EventLoop for Job Worker
Job workers will now use the same EventLoop as the scheduled task that runs them (fixes vapor/queues-redis-driver#11, #59).
Bail early if no scheduled jobs exist
If no scheduled jobs exist, fail early from the process to avoid running the worker unnecessarily.
Fix everySecond bug
This update fixes a bug that caused everySecond() not to fire when running scheduled jobs.
Support for In-Process workers
Jobs can now run as an in-process worker instead of a separate worker side-by-side with the main application:
try JobsCommand(application: app, scheduled: false).startJobs(on: .default)Or:
try JobsCommand(application: app, scheduled: true).startScheduledJobs()Jobs 1.0.0 Beta 3
- Updated to latest Vapor beta 2 release (#48)
import Jobs
import Vapor
let email = Email()
app.jobs.add(email)
try app.jobs.use(.redis(url: "redis://\(hostname):6379"))
app.get("send-email") { req in
req.jobs.dispatch(Email.self, .init(to: "tanner@vapor.codes"))
.map { HTTPStatus.ok }
}- Enabled test discovery on Linux. (#49)
Beta 2.1.0
Adds a new .at() API on ScheduledJob for one-off jobs with a specific date
Beta 2.0.0
Breaking Changes:
Dispatching jobs is now more type safe:
app.get("foo") { req in
return req.jobs.dispatch(FooJob.self, .init(foo: "bar"))
.map { "done" }
}