fix!: Create separate PeriodicJob that's only needed for pg worker - #865
Merged
Conversation
We were biasing a little too much toward having a reusable `Job` struct to use for all use cases. This made it a little awkward to use for the periodic implementation in the pg worker, and added unnecessary data to the jobs enqueued in the periodic implementation of the sidekiq worker. This PR adds a new `PeriodicJob` struct that's very similar to the `Job` struct, but adds a `periodic` field for the periodic data. This new struct is only needed by the pg worker currently. Because the periodic config is moved out of the `metadata` field, the unique index and delete query for the periodic table needed to change, hence marking this as a breaking change. Closes #864
spencewenski
pushed a commit
that referenced
this pull request
Jul 20, 2025
## 🤖 New release
* `roadster`: 0.8.0-rc.2 -> 0.8.0-rc.3 (⚠ API breaking changes)
### ⚠ `roadster` breaking changes
```text
--- failure enum_variant_missing: pub enum variant removed or renamed ---
Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/enum_variant_missing.ron
Failed in:
variant EnqueueError::PeriodicJobMissingSchedule, previously in file /tmp/.tmp5z5JcY/roadster/src/error/worker.rs:50
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
##
[0.8.0-rc.3](roadster-v0.8.0-rc.2...roadster-v0.8.0-rc.3)
- 2025-07-20
### Fixed
- [**breaking**] Create separate `PeriodicJob` that's only needed for pg
worker ([#865](#865))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were biasing a little too much toward having a reusable
Jobstruct to use for all use cases. This made it a little awkward to use for the periodic implementation in the pg worker, and added unnecessary data to the jobs enqueued in the periodic implementation of the sidekiq worker.This PR adds a new
PeriodicJobstruct that's very similar to theJobstruct, but adds aperiodicfield for the periodic data. This new struct is only needed by the pg worker currently.Because the periodic config is moved out of the
metadatafield, the unique index and delete query for the periodic table needed to change. This PR also removes an enum variant that is no longer needed. Both of these require marking this as a breaking change.Closes #864