class GlobalRegistry::Bindings::Workers::PushRelationshipWorker

Attributes

type[RW]

Public Class Methods

new(model = nil, type = nil) click to toggle source
Calls superclass method GlobalRegistry::Bindings::Worker::new
# File lib/global_registry_bindings/workers/push_relationship_worker.rb, line 17
def initialize(model = nil, type = nil)
  super model
  self.type = type.to_sym if type
end

Public Instance Methods

perform(model_class, id, type) click to toggle source
# File lib/global_registry_bindings/workers/push_relationship_worker.rb, line 22
def perform(model_class, id, type)
  super model_class, id
  self.type = type.to_sym
  push_relationship_to_global_registry
rescue ActiveRecord::RecordNotFound # rubocop:disable Lint/HandleExceptions
  # If the record was deleted after the job was created, swallow it
end