Sha256: 59d7ff8724409ba66da7d7a5715da4423cfdbfa6ada2add07ede69739b8c2149
Contents?: true
Size: 553 Bytes
Versions: 28
Compression:
Stored size: 553 Bytes
Contents
module Workarea class IndexProductChildren include Sidekiq::Worker include Sidekiq::CallbacksWorker sidekiq_options( enqueue_on: { Catalog::Variant => [:save, :save_release_changes, :destroy], Catalog::ProductImage => [:save, :save_release_changes, :destroy], with: -> { [_parent.id.to_s] } }, lock: :until_executing, query_cache: true ) def perform(id) product = Catalog::Product.find(id) rescue nil IndexProduct.perform(product) if product.present? end end end
Version data entries
28 entries across 28 versions & 1 rubygems