Fix records not being indexed sometimes (#12024)
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.
This commit is contained in:
parent
12c4ec0c83
commit
5c42f47617
10 changed files with 46 additions and 8 deletions
|
@ -16,7 +16,7 @@
|
|||
class AccountStat < ApplicationRecord
|
||||
belongs_to :account, inverse_of: :account_stat
|
||||
|
||||
update_index('accounts#account', :account) if Chewy.enabled?
|
||||
update_index('accounts#account', :account)
|
||||
|
||||
def increment_count!(key)
|
||||
update(attributes_for_increment(key))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue