mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-14 02:44:13 +00:00
5c42f47617
It's possible that after commit callbacks were not firing when exceptions occurred in the process. Also, the default Sidekiq strategy does not push indexing jobs immediately, which is not necessary and could be part of the issue too.
24 lines
391 B
Ruby
24 lines
391 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ApplicationRecord < ActiveRecord::Base
|
|
self.abstract_class = true
|
|
|
|
include Remotable
|
|
|
|
class << self
|
|
def update_index(_type_name, *_args, &_block)
|
|
super if Chewy.enabled?
|
|
end
|
|
end
|
|
|
|
def boolean_with_default(key, default_value)
|
|
value = attributes[key]
|
|
|
|
if value.nil?
|
|
default_value
|
|
else
|
|
value
|
|
end
|
|
end
|
|
end
|