Class: NewsmastMastodon::ArticleNotificationWorker

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

Instance Method Summary collapse

Instance Method Details

#perform(article_data) ⇒ Object



5
6
7
8
9
10
# File 'app/workers/newsmast_mastodon/article_notification_worker.rb', line 5

def perform(article_data)
  NewsmastMastodon::ArticleNotificationService.new.call(article_data)
rescue => e
  Rails.logger.error "[NewsmastMastodon::ArticleNotificationWorker] Error processing : #{e.message}\n#{e.backtrace.join("\n")}"
  { status: :error, error: e.message }
end