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

Making Queues Sendable #129

Merged
merged 20 commits into from
Jun 13, 2024
Merged

Making Queues Sendable #129

merged 20 commits into from
Jun 13, 2024

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Feb 4, 2024

These changes are now available in 1.15.0

The Queues package is now Sendable-correct. Also includes a number of fixes:

  • Swift minimum version is now 5.8 of course
  • QueuesCommand now does signal handling the same way ServeCommand does.
  • The logging is much more consistent and is fully structured
  • QueueWorker now handles retries in a much more consistent fashion and always requeues.
  • AsyncQueue now exists for creating Concurrency-based drivers

@gwynne gwynne added the semver-minor Contains new APIs label Feb 4, 2024
Copy link

@MahdiBM MahdiBM left a comment

Choose a reason for hiding this comment

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

Looks fine

@gwynne gwynne marked this pull request as ready for review June 1, 2024 06:52
Copy link

codecov bot commented Jun 1, 2024

Codecov Report

Attention: Patch coverage is 83.92435% with 68 lines in your changes missing coverage. Please review.

Project coverage is 82.86%. Comparing base (3dc8095) to head (895858a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   77.81%   82.86%   +5.04%     
==========================================
  Files          21       22       +1     
  Lines         798      671     -127     
==========================================
- Hits          621      556      -65     
+ Misses        177      115      -62     
Files Coverage Δ
Sources/Queues/AsyncJobEventDelegate.swift 100.00% <100.00%> (+100.00%) ⬆️
Sources/Queues/AsyncQueue.swift 100.00% <100.00%> (ø)
Sources/Queues/AsyncScheduledJob.swift 100.00% <100.00%> (+100.00%) ⬆️
Sources/Queues/JobData.swift 100.00% <100.00%> (ø)
Sources/Queues/JobIdentifier.swift 100.00% <ø> (ø)
Sources/Queues/NotificationHook.swift 100.00% <100.00%> (ø)
Sources/Queues/QueueName.swift 100.00% <100.00%> (+50.00%) ⬆️
Sources/Queues/QueuesDriver.swift 100.00% <100.00%> (ø)
Sources/Queues/QueuesEventLoopPreference.swift 100.00% <100.00%> (+100.00%) ⬆️
Sources/Queues/Request+Queues.swift 100.00% <100.00%> (ø)
... and 12 more

Sources/Queues/Job.swift Show resolved Hide resolved
Sources/Queues/JobData.swift Outdated Show resolved Hide resolved
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.

Nothing blocking - some comments

Sources/Queues/Application+Queues.swift Outdated Show resolved Hide resolved
Sources/Queues/QueuesConfiguration.swift Show resolved Hide resolved
Sources/Queues/QueuesCommand.swift Show resolved Hide resolved
Sources/Queues/QueuesCommand.swift Outdated Show resolved Hide resolved
Sources/Queues/QueueWorker.swift Outdated Show resolved Hide resolved
Sources/Queues/Job.swift Outdated Show resolved Hide resolved
Sources/Queues/JobData.swift Outdated Show resolved Hide resolved
… Sendable-safe, use assert instead of precondition in JobData init, update queuedAt value for retries in QueueWorker, QueuesCommand doesn't need to be @unchcked, make QueuesDriver require `Sendable`
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

@gwynne gwynne merged commit 15829c5 into main Jun 13, 2024
7 of 8 checks passed
@gwynne gwynne deleted the sending-and-sendability branch June 13, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Contains new APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants