Class: NewsmastMastodon::CustomFeedInsertWorker

Inherits:
Object
  • Object
show all
Includes:
DatabaseHelper, Sidekiq::Worker
Defined in:
app/workers/newsmast_mastodon/custom_feed_insert_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(status_id, account_id, options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/workers/newsmast_mastodon/custom_feed_insert_worker.rb', line 10

def perform(status_id, , options = {})
  with_primary do
    @status  = Status.find(status_id)
    @account = Account.find()
    @options = options.symbolize_keys
  end

  with_read_replica do
    check_and_insert
  end
rescue ActiveRecord::RecordNotFound
  true
end