rails-autoscale-sidekiq 1.1.0 → 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: 13c6bd1e98a94c63ae9721ee5f5fe8a0704e0c319e0e59c7f363cbea26ef6789
4
- data.tar.gz: a78902faee8159c7d80d89ef721de20e719faef1b3479fc215a5701571f0e6e1
3
+ metadata.gz: 6feec6c6b9a25d5a673354cf465abdfd2c746c2ae0ae4022d20a7dafce7718a0
4
+ data.tar.gz: f4212839ada3304688b76393cfabbeaf14cc00cfec4c96d0e7cb3be177a4c1ef
5
5
  SHA512:
6
- metadata.gz: ce5c1e4dc29c81547db9cdcc8a647af096902448cb597c6c33cb30adf0f5fa66a9900a3296454cecf48702561428df6b4a6977abe49b5aa76ef4d289de7ea4de
7
- data.tar.gz: 0e801667705cb9781f4a5a5f520e81a991a63ac204f50400c988f11fb6f744a0a52f0f45dfe3faeb4de3520349d80002754228889629578206e06b6d91962ee4
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.1.0)
4
+ rails-autoscale-core (1.1.1)
5
5
 
6
6
  PATH
7
7
  remote: .
8
8
  specs:
9
- rails-autoscale-sidekiq (1.1.0)
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.1.0"
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.1.0
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-10 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