Skip to content
Snippets Groups Projects
Commit 6b566c6b authored by Eugen's avatar Eugen Committed by GitHub
Browse files

Merge pull request #908 from krainboltgreene/application-worker-for-shared-logic

ApplicationWorker for shared worker behavior
parents 6b02591f 22dcaded
No related branches found
No related tags found
No related merge requests found
class ApplicationWorker
def info(message)
Rails.logger.info("#{self.class.name} - #{message}")
end
end
# frozen_string_literal: true # frozen_string_literal: true
class DistributionWorker class DistributionWorker < ApplicationWorker
include Sidekiq::Worker include Sidekiq::Worker
def perform(status_id) def perform(status_id)
...@@ -9,6 +9,6 @@ class DistributionWorker ...@@ -9,6 +9,6 @@ class DistributionWorker
FanOutOnWriteService.new.call(status) FanOutOnWriteService.new.call(status)
WarmCacheService.new.call(status) WarmCacheService.new.call(status)
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
true info("Couldn't find the status")
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment