Skip to content
Snippets Groups Projects
Commit 22dcaded authored by Kurtis Rainbolt-Greene's avatar Kurtis Rainbolt-Greene
Browse files

We're going to want these nice helper methods, lets share them with a parent...

We're going to want these nice helper methods, lets share them with a parent class that matches Rails 5 practices (application level abstraction)
parent ccb6a658
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
class DistributionWorker
class DistributionWorker < ApplicationWorker
include Sidekiq::Worker
def perform(status_id)
......@@ -9,6 +9,6 @@ class DistributionWorker
FanOutOnWriteService.new.call(status)
WarmCacheService.new.call(status)
rescue ActiveRecord::RecordNotFound
true
info("Couldn't find the status")
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