Releases: vapor-community/vapor-queues-fluent-driver
Fix race condition between set() and push()
A worker can end up picking up a job between set() and push(), causing a race condition that results in the job running twice. This update fixes the race by adding an initial state for jobs that haven't yet been pushed.
There is no test included because I couldn't work out a clean way to reliably test for the race.
Fixes #13.
Thanks to @sterien7 for reporting, and to @sidepelican for the excellent analysis of the problem in the original report against the old version of the driver!
Implement preservable jobs and configurable jobs table name
Preserved jobs, if enabled, are marked with a completed state in the database. Turning preservation off if it was previously on does not clear old jobs from the table; it just prevents new ones from being preserved.
Configuring the jobs table name requires passing the same name (and optionally, space) to both the queue driver and the migration. This is necessary because there's no way for the migration to see the driver's configuration.
3.0.0-beta.3.1 - Fix timestamp columns in MySQL 5.7
No other changes in this release.
3.0.0-beta.3 - AsyncQueue and lots more tests
Detailed changes:
- The queue driver now adopts the new
AsyncQueue
protocol and no longer has to go back and forth between futures. - Adopters of this package are no longer forced to have all three of the Fluent SQL database driver stacks (SQLite, Postgres, MySQL) in their dependencies (although most modern versions of SwiftPM manage to avoid this problem already); the tests instead will only use whichever drivers were included at the time of the tests being built (defaults to none, except in CI).
- The
StoredJobState.completed
enum case has been removed, since we never actually used it. This incidentally improves the behavior of theDELETE
query in the queue'sclear()
method. - The tests are now more comprehensive.
- More
Sendable
warnings fixed. - Made the database queries (even) more readable.
3.0.0-beta.2.4 - Miscellaneous cleanup
- Bump the versions of our dependencies
- Clean up the docs
- Update the tests for the Concurrency-related changes in Vapor
3.0.0-beta.2.3 - Fix MySQL and PostgreSQL for real (I think)
See #4. We now handle enums and the blob column correctly across the board and actually test all three drivers (though only locally, not yet in CI).
3.0.0-beta.2.2 - Support MySQL 5.7
MySQL before 8.0 (why is anyone still using 5.7? 😭) didn't support SKIP LOCKED
.
3.0.0-beta.2.1 - Fix enums
We were mishandling enums in all three database types.
3.0.0-beta.2 - Overhaul package for present-day Fluent and Vapor
This is a fork and complete overhaul of the entire package, updating it for the current versions of Vapor and Fluent and improving performance and behavior.
Changes in public API in this version:
JobMetadataMigration
is no longer configurable.QueuesFluentDbType
has been removed.
All databases supported by Fluent remain supported by this version.