2016-05-29 21:38:08 -04:00
|
|
|
class SchedulerStat < ActiveRecord::Base
|
|
|
|
def self.purge_old
|
2017-04-28 18:05:15 -04:00
|
|
|
where('started_at < ?', 1.months.ago).delete_all
|
2016-05-29 21:38:08 -04:00
|
|
|
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
|
2017-04-25 13:33:38 -04:00
|
|
|
# error :text
|
2016-05-29 21:38:08 -04:00
|
|
|
#
|