Class: ActivityPub::UpdateDistributionJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- ActivityPub::UpdateDistributionJob
- Defined in:
- app/jobs/activitypub/update_distribution_job.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call_later(resource) ⇒ Object
4 5 6 |
# File 'app/jobs/activitypub/update_distribution_job.rb', line 4 def self.call_later(resource) perform_later(resource.id, resource.class.name) end |
Instance Method Details
#perform(resource_id, resource_class_name) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/jobs/activitypub/update_distribution_job.rb', line 8 def perform(resource_id, resource_class_name) @resource = resource_class_name.constantize.find(resource_id) inboxes.each do |inbox_url| ActivityPub::DeliveryJob.perform_later(signed_payload, account.id, inbox_url) end rescue ActiveRecord::RecordNotFound true end |