9 lines
235 B
Ruby
9 lines
235 B
Ruby
class ClearOldPullsJob < ApplicationJob
|
|
queue_as :high
|
|
|
|
def perform(args = {})
|
|
max_hours_to_keep = ENV['MAX_HISTORY_HOURS']&.to_i || 2
|
|
TipSourceData.where("created_at < ?", max_hours_to_keep.hours.ago).delete_all
|
|
end
|
|
end
|