Class: ActivityPub::DeliveryJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- ActivityPub::DeliveryJob
- Defined in:
- app/jobs/activitypub/delivery_job.rb
Constant Summary collapse
- HEADERS =
{ 'Content-Type' => 'application/activity+json' }.freeze
Instance Method Summary collapse
Instance Method Details
#perform(json, source_account_id, inbox_url, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/jobs/activitypub/delivery_job.rb', line 6 def perform(json, source_account_id, inbox_url, = {}) @json = json @source_account = ::Account.find(source_account_id) @inbox_url = inbox_url @options = .with_indifferent_access perform_request rescue => e raise e.class, "Delivery failed for #{inbox_url}: #{e.}", e.backtrace[0] end |