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

This commit is contained in:
Guo Xiang Tan 2019-01-18 16:36:11 +08:00
parent f89a32e759
commit 95e3841974
2 changed files with 1 additions and 22 deletions

View File

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

View File

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