Class: NewsmastMastodon::GhostNotificationWorker

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

Instance Method Summary collapse

Instance Method Details

#perform(ghost_post_data) ⇒ Object



10
11
12
13
14
15
# File 'app/workers/newsmast_mastodon/ghost_notification_worker.rb', line 10

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