-
Notifications
You must be signed in to change notification settings - Fork 89
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
Make it easier to get in progress jobs of a certain type #3777
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm - just naming comment
pkg/jobstore/boltdb/store_test.go
Outdated
@@ -45,6 +45,7 @@ func (s *BoltJobstoreTestSuite) SetupTest() { | |||
|
|||
jobFixtures := []struct { | |||
id string | |||
typ string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid question - why not e the field "jobType" instead of "typ". Is this something idiomatic about go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type is a keyword, but I guess jobType should be okay.
Currently the inprogress index is just the ID of the job that is inprogress. This commit switches the inprogress index to a composite key containing both the ID and the Type of the job. This allows for filtering of active jobs of a certain type without having to serde each entire job referenced in the index. We may at a future date want to introduce CompositeIndex type alongside the current Index type.
75843d6
to
5497308
Compare
Currently the inprogress index is just the ID of the job that is inprogress. This PR switches the inprogress index to a composite key containing both the ID and the Type of the job. This allows for filtering of active jobs of a certain type without having to serde each entire job referenced in the index. We may at a future date want to introduce CompositeIndex type alongside the current Index type.
Currently the inprogress index is just the ID of the job that is inprogress. This PR switches the inprogress index to a composite key containing both the ID and the Type of the job. This allows for filtering of active jobs of a certain type without having to serde each entire job referenced in the index.
We may at a future date want to introduce CompositeIndex type alongside the current Index type.