Skip to content

Commit

Permalink
Cleanup all jobs over one week old
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jun 3, 2024
1 parent 7133717 commit 597f01d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def self.check_statuses

def self.clean_up
Job.status(["complete",'error']).where('created_at < ?', 1.day.ago).delete_all
Job.where('created_at < ?', 1.week.ago).delete_all
end

def check_status
Expand Down

0 comments on commit 597f01d

Please sign in to comment.