Sha256: a6c2a69014c8f98c1b0dcb1a1ce220372d867ef24c6cda9a700dcc26bd203e0e

Contents?: true

Size: 854 Bytes

Versions: 20

Compression:

Stored size: 854 Bytes

Contents

# frozen_string_literal: true

require 'global_registry_bindings/worker'
require 'global_registry_bindings/entity/entity_type_methods'
require 'global_registry_bindings/entity/push_entity_methods'

module GlobalRegistry #:nodoc:
  module Bindings #:nodoc:
    module Workers #:nodoc:
      class PushEntityWorker < GlobalRegistry::Bindings::Worker
        include GlobalRegistry::Bindings::Entity::EntityTypeMethods
        include GlobalRegistry::Bindings::Entity::PushEntityMethods
        sidekiq_options unique: :until_and_while_executing

        def perform(model_class, id)
          super model_class, id
          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

20 entries across 20 versions & 1 rubygems

Version Path
global-registry-bindings-0.6.2 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.6.1 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.6.0 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.5.0 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.4.0 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.3.3 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.3.2 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.3.1 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.3.0 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.2.0 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.9 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.8 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.7 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.6 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.5 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.4 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.3 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.2 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.1 lib/global_registry_bindings/workers/push_entity_worker.rb
global-registry-bindings-0.1.0 lib/global_registry_bindings/workers/push_entity_worker.rb