From 06323f9c89a3fa842bd50b458cf86c0799c0fe45 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX <j.jaffeux@gmail.com> Date: Sat, 21 Jul 2018 12:42:03 -0400 Subject: [PATCH] FIX: takes old dashboard out of caching job --- app/jobs/scheduled/dashboard_stats.rb | 3 --- spec/jobs/dashboard_stats_spec.rb | 18 ------------------ 2 files changed, 21 deletions(-) delete mode 100644 spec/jobs/dashboard_stats_spec.rb diff --git a/app/jobs/scheduled/dashboard_stats.rb b/app/jobs/scheduled/dashboard_stats.rb index fad61bdb3af..905795d921c 100644 --- a/app/jobs/scheduled/dashboard_stats.rb +++ b/app/jobs/scheduled/dashboard_stats.rb @@ -13,9 +13,6 @@ module Jobs # send a message to admins no more often than once per week. GroupMessage.create(Group[:admins].name, :dashboard_problems, limit_once_per: 7.days.to_i) end - - # TODO: decide if we want to keep caching this every 30 minutes - AdminDashboardData.refresh_stats end end end diff --git a/spec/jobs/dashboard_stats_spec.rb b/spec/jobs/dashboard_stats_spec.rb deleted file mode 100644 index 9a339c53a87..00000000000 --- a/spec/jobs/dashboard_stats_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'rails_helper' - -describe Jobs::DashboardStats do - it 'caches the stats' do - freeze_time - - begin - stats = AdminDashboardData.fetch_stats.to_json - cache_key = AdminDashboardData.stats_cache_key - - expect($redis.get(cache_key)).to eq(nil) - expect(described_class.new.execute({})).to eq(stats) - expect($redis.get(cache_key)).to eq(stats) - ensure - $redis.del(cache_key) - end - end -end