FIX: takes old dashboard out of caching job

This commit is contained in:
Joffrey JAFFEUX 2018-07-21 12:42:03 -04:00 committed by GitHub
parent 0972dd2552
commit 06323f9c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 21 deletions

View File

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

View File

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