Skip to content
Extraits de code Groupes Projets
Valider 22dcaded rédigé par Kurtis Rainbolt-Greene's avatar Kurtis Rainbolt-Greene
Parcourir les fichiers

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
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
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% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter