Sha256: f119e740738f51e04a31f9772947d05a5bc2583047bc59785d42a062ac4ae609

Contents?: true

Size: 275 Bytes

Versions: 2

Compression:

Stored size: 275 Bytes

Contents

# frozen_string_literal: true

if defined?(ActiveRecord::Base)
  module MiniScheduler
    class Stat < ActiveRecord::Base
      self.table_name = "scheduler_stats"

      def self.purge_old
        where("started_at < ?", 1.months.ago).delete_all
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mini_scheduler-0.18.0 app/models/mini_scheduler/stat.rb
mini_scheduler-0.17.0 app/models/mini_scheduler/stat.rb