Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt the new AsyncQueue, remove dependency on all three Fluent drivers, other cleanup #7

Merged
merged 8 commits into from
Jun 14, 2024

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Jun 14, 2024

Changes:

  • 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 SwiftPM usually manages to avoid this problem on its own); the tests instead will only use whichever drivers were included at the time of the tests being built (defaults to none).
  • StoredJobState.completed has been removed, since we never actually used it. This helpfully improves the behavior of the clear() query.
  • The queue driver now adopts the new AsyncQueue protocol and no longer has to go back and forth between futures.
  • The tests are now more comprehensive.
  • Fixed another Sendable warning.

gwynne added 5 commits June 13, 2024 16:22
…r stacks regardless of whether they use them.
…s out we never use it anyway. This also removes a trivially always-true condition from the `clear()` query.
…d add a few more SQLKit utilities to make the queries more nicer.
…test all database drivers that are available at the time the tests are built. Also use ConsoleKit's logger instead of StreamLogHandler because it's way more readable.
@gwynne gwynne added the enhancement New feature or request label Jun 14, 2024
@gwynne gwynne requested review from 0xTim, MahdiBM and ptoffy June 14, 2024 06:41
Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 97.39130% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.07%. Comparing base (c369658) to head (9f8f9f0).

Additional details and impacted files
@@             Coverage Diff             @@
##             main       #7       +/-   ##
===========================================
+ Coverage   73.55%   92.07%   +18.51%     
===========================================
  Files           6        7        +1     
  Lines         208      227       +19     
===========================================
+ Hits          153      209       +56     
+ Misses         55       18       -37     
Files Coverage Δ
...ources/QueuesFluentDriver/FluentQueuesDriver.swift 95.23% <100.00%> (ø)
Sources/QueuesFluentDriver/JobModel.swift 0.00% <ø> (ø)
Sources/QueuesFluentDriver/JobModelMigrate.swift 100.00% <100.00%> (+20.00%) ⬆️
...urces/QueuesFluentDriver/QueuesTypes+Codable.swift 100.00% <100.00%> (ø)
...ources/QueuesFluentDriver/SQLKit+Convenience.swift 96.49% <100.00%> (+28.99%) ⬆️
Sources/QueuesFluentDriver/FluentQueue.swift 95.40% <96.34%> (+18.80%) ⬆️

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - this should probably be a major release right?

[email protected] Outdated Show resolved Hide resolved
Sources/QueuesFluentDriver/JobModel.swift Show resolved Hide resolved
@gwynne gwynne force-pushed the asyncify-and-cleanup branch 5 times, most recently from 9967023 to 4f067f6 Compare June 14, 2024 18:00
@gwynne gwynne force-pushed the asyncify-and-cleanup branch from 4f067f6 to 9f8f9f0 Compare June 14, 2024 18:07
@gwynne gwynne merged commit 0ecd6fa into main Jun 14, 2024
9 of 10 checks passed
@gwynne gwynne deleted the asyncify-and-cleanup branch June 14, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants