move short event life option earlier in list

stvnrlly 9 年 前
コミット
725bc24513
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      app/models/agent.rb

+ 1 - 1
app/models/agent.rb

@@ -23,7 +23,7 @@ class Agent < ActiveRecord::Base
23 23
 
24 24
   EVENT_RETENTION_SCHEDULES = [["Forever", 0], ["1 day", 1], *([2, 3, 4, 5, 7, 14, 21, 30, 45, 90, 180, 365].map {|n| ["#{n} days", n] })]
25 25
   if ENV['SCHEDULER_EXPIRATION_CHECK'] == 'frequent'
26
-    EVENT_RETENTION_SCHEDULES.push(["A minute", 60])
26
+    EVENT_RETENTION_SCHEDULES.insert(1, ["A minute", 60])
27 27
   end
28 28
 
29 29
   attr_accessible :options, :memory, :name, :type, :schedule, :controller_ids, :control_target_ids, :disabled, :source_ids, :scenario_ids, :keep_events_for, :propagate_immediately, :drop_pending_events