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

Implement preservable jobs and configurable jobs table name #11

Merged
merged 9 commits into from
Oct 1, 2024

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Sep 28, 2024

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.

Closes #9.
Closes #10.

@gwynne gwynne added the enhancement New feature or request label Sep 28, 2024
@gwynne gwynne requested review from 0xTim, MahdiBM and ptoffy September 28, 2024 01:02
Copy link

codecov bot commented Sep 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.47%. Comparing base (bc47078) to head (361dc9f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
+ Coverage   92.43%   98.47%   +6.03%     
==========================================
  Files           7        7              
  Lines         238      262      +24     
==========================================
+ Hits          220      258      +38     
+ Misses         18        4      -14     
Files with missing lines Coverage Δ
Sources/QueuesFluentDriver/FluentQueue.swift 96.77% <100.00%> (+1.37%) ⬆️
...ources/QueuesFluentDriver/FluentQueuesDriver.swift 96.55% <100.00%> (+1.31%) ⬆️
Sources/QueuesFluentDriver/JobModel.swift 100.00% <ø> (+100.00%) ⬆️
Sources/QueuesFluentDriver/JobModelMigrate.swift 100.00% <100.00%> (ø)
...es/QueuesFluentDriver/Queues.Provider+Fluent.swift 100.00% <100.00%> (ø)
...ources/QueuesFluentDriver/SQLKit+Convenience.swift 100.00% <100.00%> (+3.50%) ⬆️

Sources/QueuesFluentDriver/JobModelMigrate.swift Outdated Show resolved Hide resolved
.github/workflows/test.yml Outdated Show resolved Hide resolved
…and ancient MySQL at the same time easier). Add testing of the "space" functionality. Improve test coverage to 98%.
Copy link

@dimitribouniol dimitribouniol left a comment

Choose a reason for hiding this comment

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

Changes look good, but I am immesurably bothered by sqlDb (instead of sqlDB) and databaseId (instead of databaseID), but I read the ship has sailed there melting 🫠

@0xTim
Copy link
Member

0xTim commented Sep 28, 2024

Changes look good, but I am immesurably bothered by sqlDb (instead of sqlDB) and databaseId (instead of databaseID), but I read the ship has sailed there melting 🫠

Yeah what in the Javascript is that about

@gwynne
Copy link
Member Author

gwynne commented Sep 28, 2024

Changes look good, but I am immesurably bothered by sqlDb (instead of sqlDB) and databaseId (instead of databaseID), but I read the ship has sailed there melting 🫠

Yeah what in the Javascript is that about

... Fine, fine... whining babies... 😂

Copy link
Member

@ptoffy ptoffy 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 4e31dfa into main Oct 1, 2024
8 of 9 checks passed
@gwynne gwynne deleted the new-features branch October 1, 2024 12:48
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.

Configurable jobs table name Configurable deletion of completed jobs
6 participants