worker_killer 1.0.3.189098 → 1.0.3.189564

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
  SHA256:
3
- metadata.gz: 833e8af55d32a033c006174376730eeb13939b9a71428bced0bd6fbbf31a3fbf
4
- data.tar.gz: 8867071b25e0bcfaea641fdc5595794cfd4ad166da32f6aa55d600322e925bf0
3
+ metadata.gz: 8de386a9112f6941110e0cc8f75d2276c859ca36d9cff4e5eadfb39dd33013fe
4
+ data.tar.gz: 7a1f7f3b042a3603db7e0a51a30cdb99f872bfb1288d8545c1b893241a1118f8
5
5
  SHA512:
6
- metadata.gz: 7ceb0b3fdfb56a24480ff28a809dcb6bf96613d31fefa2c9fd2eca60e12205ef211c160683e6c9f42bb06928126476393430d3d6972da497872c886d2fcdd319
7
- data.tar.gz: c74db721a9e0684598abc4f0d40f1aeb7b55be6d77e14a214b15431d0d1012272df43ff584d41673f8f5f28b5037ef441ae39938c093b1aba7a5d85d3fadd60f
6
+ metadata.gz: a6397322a93eb40332f728b0b0bf5114aec40571f76ee3a6a64b1125be8fa7d9221f3158be4b1960fcd8c28b26cebe2b500cb582ebee39876414a881e709a0ed
7
+ data.tar.gz: 39bafdacf68392a4c1c05ac5b600d821a7e3cd368acbe3b585d855b1527e08b3898c53b17f458a74207c0987c2d93e9689302ce5c1a3b0d4b5c9138e8a382a67
@@ -24,11 +24,12 @@ module WorkerKiller
24
24
  def configure_lifecycle(lifecycle)
25
25
  # Count condition after every job
26
26
  lifecycle.after(:perform) do |worker, *_args|
27
- @time_to_burn = limiter.check
27
+ @time_to_burn ||= limiter.check
28
28
  end
29
29
 
30
30
  # Stop execution only after whole loop completed
31
31
  lifecycle.after(:loop) do |worker, *_args|
32
+ @time_to_burn ||= limiter.check
32
33
  reaction.call(limiter, killer, worker) if @time_to_burn
33
34
  end
34
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: worker_killer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3.189098
4
+ version: 1.0.3.189564
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samoilenko Yuri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2023-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: get_process_mem