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: 2e33b6c981e60c62cb2d759e7477282962d48e20
4
- data.tar.gz: be03799031354434d562e4095dc31b4fc31d7572
3
+ metadata.gz: d4479f5c7516a8a83877780f722022bafd34a5a4
4
+ data.tar.gz: 168d6fee108e64f3a6312829b94fa03cfe62bcaf
5
5
  SHA512:
6
- metadata.gz: 3b87f6986e8ce7f86ee9410cbd1346aa7aa0fc86d9f46906704ae6cacb65669d5635559740ca7e881b9f99674108b1d957abdfc39beafd2ae36fd550dd259dd1
7
- data.tar.gz: 42b3a2cfab92aff9b5c08dc28035589360571cdf0b99aab7efd4e0c5ab3ea928d9c0bf404fbd4dbe377c4b849163ef4cbc05418ed0c53432c5e4282f616a1e76
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
@@ -1,3 +1,3 @@
1
1
  module SidekiqProcessKiller
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_process_killer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shayon Mukherjee