Cache status reference mark when posting
This commit is contained in:
parent
d8ebc66709
commit
71c451a569
6 changed files with 27 additions and 2 deletions
|
@ -161,6 +161,10 @@ class UpdateStatusService < BaseService
|
|||
|
||||
def update_references!
|
||||
reference_ids = (@options[:status_reference_ids] || []).map(&:to_i).filter(&:positive?)
|
||||
|
||||
return unless ProcessReferencesService.need_process?(@status, reference_ids, [])
|
||||
|
||||
Rails.cache.write("status_reference:#{@status.id}", true, expires_in: 10.minutes)
|
||||
ProcessReferencesWorker.perform_async(@status.id, reference_ids, [])
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue