Skip to content

A platform for community discussion. Free, open, simple.

FIX: Remove old reference and use `MiniScheduler::Stat`.

Guo Xiang Tan95e3841974bd
diff --git a/app/jobs/scheduled/weekly.rb b/app/jobs/scheduled/weekly.rb
index 1a4df35cde0..72fdb0127c2 100644
--- a/app/jobs/scheduled/weekly.rb
+++ b/app/jobs/scheduled/weekly.rb
@@ -11,7 +11,7 @@ module Jobs
Post.calculate_avg_time
Topic.calculate_avg_time
ScoreCalculator.new.calculate
- SchedulerStat.purge_old
+ MiniScheduler::Stat.purge_old
Draft.cleanup!
UserAuthToken.cleanup!
end
diff --git a/app/models/scheduler_stat.rb b/app/models/scheduler_stat.rb
deleted file mode 100644
index ac3aab00c68..00000000000
--- a/app/models/scheduler_stat.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-class SchedulerStat < ActiveRecord::Base
- def self.purge_old
- where('started_at < ?', 1.months.ago).delete_all
- end
-end
-
-# == Schema Information
-#
-# Table name: scheduler_stats
-#
-# id :integer not null, primary key
-# name :string not null
-# hostname :string not null
-# pid :integer not null
-# duration_ms :integer
-# live_slots_start :integer
-# live_slots_finish :integer
-# started_at :datetime not null
-# success :boolean
-# error :text
-#