From 19b9e1e2c3d621b5f9f2367980dae62648fe22fa Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 5 Feb 2017 17:24:18 +0100 Subject: Preheat status cache --- app/workers/distribution_worker.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/workers/distribution_worker.rb') diff --git a/app/workers/distribution_worker.rb b/app/workers/distribution_worker.rb index f423d43ae..f4e738d80 100644 --- a/app/workers/distribution_worker.rb +++ b/app/workers/distribution_worker.rb @@ -4,7 +4,10 @@ class DistributionWorker include Sidekiq::Worker def perform(status_id) - FanOutOnWriteService.new.call(Status.find(status_id)) + status = Status.find(status_id) + + FanOutOnWriteService.new.call(status) + WarmCacheService.new.call(status) rescue ActiveRecord::RecordNotFound true end -- cgit