0
0
Fork 0

Merge branch 'master' into broadcast-to-worker

This commit is contained in:
Eugen 2017-04-05 18:44:33 +02:00 committed by GitHub
commit 3d8b80e1cc
22 changed files with 183 additions and 48 deletions

View file

@ -13,5 +13,7 @@ class AfterRemoteFollowRequestWorker
follow_request.destroy
FollowService.new.call(follow_request.account, updated_account.acct)
rescue ActiveRecord::RecordNotFound
true
end
end

View file

@ -13,5 +13,7 @@ class AfterRemoteFollowWorker
follow.destroy
FollowService.new.call(follow.account, updated_account.acct)
rescue ActiveRecord::RecordNotFound
true
end
end

View file

@ -0,0 +1,5 @@
class ApplicationWorker
def info(message)
Rails.logger.info("#{self.class.name} - #{message}")
end
end

View file

@ -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