Class: GlobalRegistry::Bindings::Workers::PullMdmIdWorker

Inherits:
GlobalRegistry::Bindings::Worker show all
Includes:
Entity::MdmMethods
Defined in:
lib/global_registry_bindings/workers/pull_mdm_id_worker.rb

Instance Attribute Summary

Attributes inherited from GlobalRegistry::Bindings::Worker

#model

Instance Method Summary collapse

Methods included from Entity::MdmMethods

#dig_global_registry_mdm_id_from_entity, #pull_mdm_id_from_global_registry

Methods inherited from GlobalRegistry::Bindings::Worker

#initialize, perform_async, perform_async_real

Constructor Details

This class inherits a constructor from GlobalRegistry::Bindings::Worker

Instance Method Details

#perform(model_class, id) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/global_registry_bindings/workers/pull_mdm_id_worker.rb', line 28

def perform(model_class, id)
  super model_class, id
  pull_mdm_id_from_global_registry
rescue ActiveRecord::RecordNotFound
  # If the record was deleted after the job was created, swallow it
  nil
rescue RestClient::ResourceNotFound
  Rails.logger.info "GR entity for #{self.class.name} #{id} does not exist; will _not_ retry"
end