Sha256: 1826aa6738ed453e8c26f4e5ac78021552eee11f80a23815f4921aded338ed07

Contents?: true

Size: 380 Bytes

Versions: 62

Compression:

Stored size: 380 Bytes

Contents

module Workarea
  class BustNavigationCache
    include Sidekiq::Worker
    include Sidekiq::CallbacksWorker

    sidekiq_options(
      enqueue_on: { Navigation::Taxon => :save },
      queue: 'low',
      retry: false
    )

    def perform(id)
      taxon = Navigation::Taxon.find(id)
      taxon.ancestors.each(&:touch)
      taxon.descendants.each(&:touch)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.13 app/workers/workarea/bust_navigation_cache.rb
workarea-core-3.4.12 app/workers/workarea/bust_navigation_cache.rb