cloud66 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 354105873b589769eefa61120e7a7762cb6477097554a0c2aa5f1131d09a78c0
4
- data.tar.gz: 3fe5d67f8d5bbab66998ea17547403d2bbcb907120275d096e1ec4003468768c
3
+ metadata.gz: a7f1762094f1564cb8ef81ac5dc660e5518e6465f8671ba971142490f2dd147f
4
+ data.tar.gz: ade593338a2c692be8b538f8bda660dbdb0ea396e4a3145e694d9853599ac76f
5
5
  SHA512:
6
- metadata.gz: b901bbe9aa20b23d021ebdddb5add70aaaaeed1dc3756e201e231db63d9b291b9a4d3e48bc31f326a3d6ec985d868e0e28d8554f4e4ac499c949f895bebe8c48
7
- data.tar.gz: 989bf075cb02ae0e9b6b618f03bb460df72cbb7b423794277206a622eaa742e9ca6ff20eaa19a8af09ad5de9df2717e096c62e96c3c5f8c989b46333483c71d1
6
+ metadata.gz: 9ef041fc031b03345a49645961d78064070a1935f0b46f99806713d97d88b44d0146e2fecf258a3d5d4b22afde3155d6ba37d57d3f6ce23e4be2b338b76cd247
7
+ data.tar.gz: b4ede46db994d02a169639f6305a10ae0bcfd9482403738da9a1e509d5687aee748b36ff69d66ace394a13c2355fe0a1b5d4a5b993a3bbf0f912d3dc19477d87
data/CHANGELOG.md CHANGED
@@ -1,2 +1,5 @@
1
1
  # 1.0.0
2
2
  Initial release.
3
+
4
+ # 1.1.0
5
+ Add support for sidekiq 7.2+
data/README.md CHANGED
@@ -10,10 +10,12 @@ This endpoint will detect which supported queue frameworks your application uses
10
10
  - How many jobs are currently being processed in a given queue
11
11
 
12
12
  The supported queue frameworks are:
13
- - [Sidekiq](https://github.com/sidekiq/sidekiq)
13
+ - [Sidekiq (7+)](https://github.com/sidekiq/sidekiq)
14
14
  - [Resque](https://github.com/resque/resque)
15
15
  - [Delayed Job](https://github.com/collectiveidea/delayed_job) (via the [ActiveRecord backend](https://github.com/collectiveidea/delayed_job_active_record))
16
16
 
17
+ If you are using the Rails `ActionDispatch::HostAuthorization` middleware (through e.g. `config.hosts`), we suggest [excluding the metrics endpoint](https://guides.rubyonrails.org/configuring.html#actiondispatch-hostauthorization) from host authorization using `config.host_authorization.exclude`.
18
+
17
19
  ### Configuration
18
20
  You can configure this gem by creating a file in your Rails initializers (e.g. `config/initializers/cloud66.rb`) and adding the following (values shown are the defaults):
19
21
  ```ruby
@@ -19,7 +19,12 @@ module Cloud66
19
19
  def queue_array_concrete
20
20
  sidekiq_pending = ::Sidekiq::Queue.all.map { |q| [q.name, q.size] }.to_h
21
21
 
22
- sidekiq_working_array = ::Sidekiq::WorkSet.new.map { |_, _, work| work["queue"] }
22
+ # extract queue names from currently processing jobs
23
+ # note: in sidekiq 7.2+, work is a Sidekiq::Work object with a .queue method
24
+ # in older versions, work responds to [] for hash-style access
25
+ sidekiq_working_array = ::Sidekiq::WorkSet.new.map do |_, _, work|
26
+ work.respond_to?(:queue) ? work.queue : work["queue"]
27
+ end
23
28
  sidekiq_working = ::Hash.new(0).tap { |h| sidekiq_working_array.each { |queue| h[queue] += 1 } }
24
29
 
25
30
  result = []
@@ -1,3 +1,3 @@
1
1
  module Cloud66
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud66
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloud 66
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2025-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.4.10
72
+ rubygems_version: 3.5.22
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Cloud 66 Ruby plugin