sidekiq_process_killer 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4479f5c7516a8a83877780f722022bafd34a5a4
|
4
|
+
data.tar.gz: 168d6fee108e64f3a6312829b94fa03cfe62bcaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e914a24604a8239c30f0f3bcbbaf30b8521737a447a8bfd40c1577c1ccc47e45d8d839513c53a1fd650ed6688a4f6b1497d577001db2ea3508e6b4ed481b7c2b
|
7
|
+
data.tar.gz: d4d1c6f6b7781007337bb6db7f72a7c0208d6719c4b4ec20d518ee732be36e23a6f24851652479e753f1691bc575c47a586e4b42253add7e0d1f8989ec933202
|
@@ -17,13 +17,14 @@ module SidekiqProcessKiller
|
|
17
17
|
memory_threshold = SidekiqProcessKiller.memory_threshold
|
18
18
|
return if memory_threshold > memory
|
19
19
|
|
20
|
+
send_signal("SIGTERM", pid)
|
21
|
+
sleep 2
|
20
22
|
log_warn("Breached RSS threshold at #{memory_threshold}. Sending TERM Signal.")
|
21
23
|
increment_statsd({
|
22
24
|
metric_name: "process.term.signal.sent",
|
23
25
|
worker_name: worker.class,
|
24
26
|
current_memory_usage: memory
|
25
27
|
})
|
26
|
-
send_signal("SIGTERM", pid)
|
27
28
|
end
|
28
29
|
|
29
30
|
private def process_memory
|