-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Upgrade good_job to its latest version #17887
base: dev
Are you sure you want to change the base?
Conversation
Should we make the v4 check ( |
@klaustopher probably. For that we might need @machisuji to have a proper discussion. |
9c0ce95
to
09cf39c
Compare
@klaustopher @mereghost I'm not sure how the v4 check would work and how we can make sure all current jobs have been processed before the upgrade. Is that even necessary? Perhaps we can talk about this in person. I'll be off until next week, Tuesday, though! |
Let's talk then. While important, this can wait a week. I'll try to find a time for us to talk about it. |
With v4 goodjob has split jobs and job executions into 2 tables, previously everything was handled in one table and that lead to weird locking situations, etc. So they split it up. With the latest 3.x versions they have already done the split but were loading jobs from both tables. The GoodJob.migrated? && # ensures all goodjob migrations are present
GoodJob::Job.discrete_support? && # ensures the table for discrete executions exists
GoodJob::Job.where(finished_at: nil).where(is_discrete: [nil, false]).none? # ensures there's no more jobs that are not discrete that are not finished yet Alternatively we can also determine this via an SQL query SELECT COUNT(*) FROM "good_jobs" WHERE finished_at IS NULL AND is_discrete IS NOT TRUE This should return |
Following up on #17327 this updates GoodJob to its latest 4.x release.