mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: takes old dashboard out of caching job
This commit is contained in:
parent
0972dd2552
commit
06323f9c89
2 changed files with 0 additions and 21 deletions
|
@ -13,9 +13,6 @@ module Jobs
|
||||||
# send a message to admins no more often than once per week.
|
# 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)
|
GroupMessage.create(Group[:admins].name, :dashboard_problems, limit_once_per: 7.days.to_i)
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: decide if we want to keep caching this every 30 minutes
|
|
||||||
AdminDashboardData.refresh_stats
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -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
|
|
Loading…
Add table
Add a link
Reference in a new issue