Class: NewsmastMastodon::CustomFeedInsertWorker
- Inherits:
-
Object
- Object
- NewsmastMastodon::CustomFeedInsertWorker
- 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, account_id, = {}) with_primary do @status = Status.find(status_id) @account = Account.find(account_id) @options = .symbolize_keys end with_read_replica do check_and_insert end rescue ActiveRecord::RecordNotFound true end |