Skip to content
Snippets Groups Projects

Archive old deployments (Delete old deployment refs)

Merged Shinya Maeda requested to merge auto-delete-unusued-environments into master
10 files
+ 101
2
Compare changes
  • Side-by-side
  • Inline
Files
10
+ 1
1
@@ -52,7 +52,7 @@ class Deployment < ApplicationRecord
scope :finished_after, ->(date) { where('finished_at >= ?', date) }
scope :finished_before, ->(date) { where('finished_at < ?', date) }
scope :archivable, -> { where('updated_at < ?', 1.year.ago).where(archived: false) }
scope :ordered, -> { order(finished_at: :desc) }
FINISHED_STATUSES = %i[success failed canceled].freeze
Loading