Skip to content

Commit

Permalink
Only set duration attribute to interval on Rails 6.1 (#1412)
Browse files Browse the repository at this point in the history
This causes ActiveRecord::ConnectionNotEstablished issues with Tapioca
  • Loading branch information
bdewater-thatch authored Jul 10, 2024
1 parent 44d66b1 commit dd81bc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/good_job/discrete_execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DiscreteExecution < BaseRecord
alias_attribute :performed_at, :created_at

# TODO: Remove when support for Rails 6.1 is dropped
attribute :duration, :interval
attribute :duration, :interval if ActiveJob.version.canonical_segments.take(2) == [6, 1]

def number
serialized_params.fetch('executions', 0) + 1
Expand Down

0 comments on commit dd81bc5

Please sign in to comment.