File tree Expand file tree Collapse file tree
src/puppetlabs/trapperkeeper Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9595 [org.openvoxproject/i18n ~i18n-version]]
9696
9797 :eastwood {:ignored-faults {:reflection {puppetlabs.trapperkeeper.logging [{:line 92 }]
98- puppetlabs.trapperkeeper.internal [{:line 220 }]
98+ puppetlabs.trapperkeeper.internal [{:line 230 }]
9999 puppetlabs.trapperkeeper.testutils.logging true
100100 puppetlabs.trapperkeeper.testutils.logging-test true
101101 puppetlabs.trapperkeeper.services.nrepl.nrepl-service-test true
Original file line number Diff line number Diff line change 113113(defn should-handle-sighup-restart?
114114 []
115115 (let [current-ms (now-ms )
116- accepted? (atom false )]
116+ accepted? (atom false )
117+ previous-ms (atom nil )]
117118 (swap! last-sighup-restart-ms
118119 (fn [last-ms]
120+ (reset! previous-ms last-ms)
119121 (if (and (some? last-ms)
120122 (< (- current-ms last-ms) min-sighup-restart-interval-ms))
121123 last-ms
122124 (do
123125 (reset! accepted? true )
124126 current-ms))))
127+ (if @accepted?
128+ (log/debug (i18n/trs " Accepting SIGHUP restart at {0}; previous accepted restart was {1}"
129+ current-ms
130+ @previous-ms))
131+ (log/warn (i18n/trs " Ignoring duplicate SIGHUP restart at {0}; previous accepted restart was {1}; minimum interval is {2} ms"
132+ current-ms
133+ @previous-ms
134+ min-sighup-restart-interval-ms)))
125135 @accepted?))
126136
127137(defn app-log-id
You can’t perform that action at this time.
0 commit comments