Sha256: 1532a5f9e45ecfdf69b470d1ecc8e95bc7110629d5c4ac47e9f0d9cb58c95caf
Contents?: true
Size: 673 Bytes
Versions: 2
Compression:
Stored size: 673 Bytes
Contents
# frozen_string_literal: true require 'sidekiq' require 'sidekiq-unique-jobs' module GlobalRegistry #:nodoc: module Bindings #:nodoc: module Workers #:nodoc: class PushGrEntityWorker include Sidekiq::Worker sidekiq_options unique: :until_and_while_executing def perform(model_class, id) klass = model_class.is_a?(String) ? model_class.constantize : model_class klass.find(id).send(:push_entity_to_global_registry) rescue ActiveRecord::RecordNotFound # rubocop:disable Lint/HandleExceptions # If the record was deleted after the job was created, swallow it end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
global-registry-bindings-0.0.6 | lib/global_registry_bindings/workers/push_gr_entity_worker.rb |
global-registry-bindings-0.0.5 | lib/global_registry_bindings/workers/push_gr_entity_worker.rb |