logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 6b566c6b885f5a6857cee7e0731273ba7a1aa498
parent: 6b02591fa3b08598a348512ccac47a1fb881a6a5
Author: Eugen <eugen@zeonfederated.com>
Date:   Wed,  5 Apr 2017 10:23:52 +0200

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

ApplicationWorker for shared worker behavior

Diffstat:

Aapp/workers/application_worker.rb5+++++
Mapp/workers/distribution_worker.rb4++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/workers/application_worker.rb b/app/workers/application_worker.rb @@ -0,0 +1,5 @@ +class ApplicationWorker + def info(message) + Rails.logger.info("#{self.class.name} - #{message}") + end +end diff --git a/app/workers/distribution_worker.rb b/app/workers/distribution_worker.rb @@ -1,6 +1,6 @@ # 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