init push - laying out the project
This commit is contained in:
8
portal/app/jobs/clear_old_pulls_job.rb
Normal file
8
portal/app/jobs/clear_old_pulls_job.rb
Normal file
@ -0,0 +1,8 @@
|
||||
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
|
Reference in New Issue
Block a user