Releases: vapor/queues
1.13.0 - Misc cleanups
What's Changed
Misc cleanups by @gwynne in #123
- Update Swift minimum version to 5.6 to match Vapor
- CI updates
Reviewers
Thanks to the reviewers for their help:
This patch was released by @gwynne
Full Changelog: https://github.com//compare/1.12.1...1.13.0
Add missing platform specifiers
This patch was authored and released by @gwynne.
Match Vapor's support
Add async job hooks
This patch was authored by @madsodgaard and released by @0xTim.
- Bump Swift version to 5.5.2
- Backport concurrency to older platforms
- Add
AsyncJobEventDelegate
for async hooks - Replace
Lock
withNIOLock
Fix typos in QueueWorker log messages
This patch was authored by @heldersrvio and released by @jdmcd.
Fixes a few typo'd log messages.
Allow public access to set ScheduleBuilder Calendar
This patch was authored by @dylanshine and released by @0xTim.
Adds a new using(_:)
API to the ScheduleBuilder
to allow the calendar to be set when creating jobs on a schedule
Add ability to use custom `Calendar` in `ScheduleBuilder`
This patch was authored by @dylanshine and released by @jdmcd.
This PR introduces the ability to pass a custom Calendar
to the ScheduleBuilder
.
I ran into an edge case where I have queues deployed across multiple regions and needed to schedule jobs based on specific time zones.
I also cleaned up some unused computed properties in the ScheduleBuilderTests
suite.
Update Supported Swift Versions
This patch was authored and released by @0xTim.
This removes support for Swift 5.2 and Swift 5.3, making Swift 5.4 the earliest supported version as announced
Make AsyncScheduledJob public so clients can conform to it
Added AsyncScheduledJob and cleaned up AsyncJob.
This patch was authored by @Andrewangeta and released by @jdmcd.
Allows AsyncJob
s to be added to the app via app.queues.add(...)
method.
Async Await Support via AsyncJob
This patch was authored by @jdmcd and released by @0xTim.
Adds AsyncJob
which allows you to specify a job that has async body implementations:
struct MyJobPayload: Content {
let name: String
}
struct MyAsyncJob: AsyncJob {
func dequeue(context: QueueContext, payload: MyJobPayload) async throws {
print(payload.name)
}
func error(context: QueueContext, error: Error, payload: MyJobPayload) async throws {
print(error)
}
}
// In configure.swift
app.queues.add(MyAsyncJob())