rails-autoscale-sidekiq 1.0.3 → 1.1.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
  SHA256:
3
- metadata.gz: 2e43b35a238aa0cd4a499d1118c193176fd285dcddf9ff3045bf25d07c37d059
4
- data.tar.gz: 41e4bedc611e4868f66e293fcbdf067504e7ed6a96665c60e7b5f3fb5a6110e9
3
+ metadata.gz: 6feec6c6b9a25d5a673354cf465abdfd2c746c2ae0ae4022d20a7dafce7718a0
4
+ data.tar.gz: f4212839ada3304688b76393cfabbeaf14cc00cfec4c96d0e7cb3be177a4c1ef
5
5
  SHA512:
6
- metadata.gz: 89aec697bbc6d87c424cc6e3308f9667f1789f2d0a968f61af3104736fcb4048da5217de56e72def49a5983d19884cccb6da8d7e1f67d6a78662076465f65a82
7
- data.tar.gz: bd9eb0523daff59bedd2c25f1e707eded49bbcfc06d9e1ccafb4bf6763e5eb4e4a1aab00ff7cc1ccdf97af6d64ad0d9209f591cda0c0dbca8618d9cb13b57d4b
6
+ metadata.gz: 6d22d76c58beef0b6cb9550aa0b54bc9ac53cce5885bfa565e5bec46b4e03947ec51636c3488fc2be586c56afb9665d68c6d48c9ec786c52677117f15f0bc76a
7
+ data.tar.gz: 67548c6da997ed2c4e74adc2454344456460873422058eebec5a06e9a401392fe8afbd75943a809d8d31f714b2f85949390643e7a9c47773bc3cd90cc2f74005
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "https://rubygems.org"
3
3
  gemspec
4
4
 
5
5
  gem "rails-autoscale-core", path: "../rails-autoscale-core"
6
+ gem "sidekiq", "~> 7.0"
6
7
  gem "minitest"
7
8
  gem "rake"
8
9
  gem "debug"
data/Gemfile.lock CHANGED
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: ../rails-autoscale-core
3
3
  specs:
4
- rails-autoscale-core (1.0.3)
4
+ rails-autoscale-core (1.1.1)
5
5
 
6
6
  PATH
7
7
  remote: .
8
8
  specs:
9
- rails-autoscale-sidekiq (1.0.3)
9
+ rails-autoscale-sidekiq (1.1.1)
10
10
  rails-autoscale-core
11
11
  sidekiq (>= 5.0)
12
12
 
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
+ concurrent-ruby (1.1.10)
16
17
  connection_pool (2.3.0)
17
18
  debug (1.6.2)
18
19
  irb (>= 1.3.6)
@@ -21,15 +22,17 @@ GEM
21
22
  irb (1.4.1)
22
23
  reline (>= 0.3.0)
23
24
  minitest (5.15.0)
24
- rack (2.2.4)
25
+ rack (3.0.0)
25
26
  rake (13.0.6)
26
- redis (4.8.0)
27
+ redis-client (0.11.1)
28
+ connection_pool
27
29
  reline (0.3.1)
28
30
  io-console (~> 0.5)
29
- sidekiq (6.5.7)
30
- connection_pool (>= 2.2.5)
31
- rack (~> 2.0)
32
- redis (>= 4.5.0, < 5)
31
+ sidekiq (7.0.1)
32
+ concurrent-ruby (< 2)
33
+ connection_pool (>= 2.3.0)
34
+ rack (>= 2.2.4)
35
+ redis-client (>= 0.9.0)
33
36
 
34
37
  PLATFORMS
35
38
  arm64-darwin-20
@@ -43,6 +46,7 @@ DEPENDENCIES
43
46
  rails-autoscale-core!
44
47
  rails-autoscale-sidekiq!
45
48
  rake
49
+ sidekiq (~> 7.0)
46
50
 
47
51
  BUNDLED WITH
48
52
  2.3.9
@@ -21,7 +21,10 @@ module RailsAutoscale
21
21
  if track_busy_jobs?
22
22
  busy_counts = Hash.new { |h, k| h[k] = 0 }
23
23
  ::Sidekiq::Workers.new.each do |pid, tid, work|
24
- busy_counts[work.dig("payload", "queue")] += 1
24
+ payload = work["payload"]
25
+ # payload is unparsed in Sidekiq 7
26
+ payload = JSON.parse(payload) if payload.is_a?(String)
27
+ busy_counts[payload["queue"]] += 1
25
28
  end
26
29
  end
27
30
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RailsAutoscale
4
4
  module Sidekiq
5
- VERSION = "1.0.3"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-autoscale-sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam McCrea
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-03 00:00:00.000000000 Z
12
+ date: 2022-11-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails-autoscale-core