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

Add missing foreign_key for supervisor <-> forks association, needed in Rails < 7.1 #36

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/solid_queue/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class SolidQueue::Process < SolidQueue::Record
include Prunable

belongs_to :supervisor, class_name: "SolidQueue::Process", optional: true, inverse_of: :forks
has_many :forks, class_name: "SolidQueue::Process", inverse_of: :supervisor, dependent: :destroy
has_many :forks, class_name: "SolidQueue::Process", inverse_of: :supervisor, foreign_key: :supervisor_id, dependent: :destroy
has_many :claimed_executions

store :metadata, accessors: [ :kind, :pid ], coder: JSON
Expand Down
1 change: 0 additions & 1 deletion test/integration/processes_lifecycle_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ProcessLifecycleTest < ActiveSupport::TestCase
# Workers were shutdown without a chance to terminate orderly, but
# since they're linked to the supervisor, the supervisor deregistering
# also deregistered them and released claimed jobs
# Processes didn't have a chance to deregister either
assert_clean_termination
end

Expand Down