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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +3 -1
- data/lib/cloud66/metrics/sidekiq.rb +6 -1
- data/lib/cloud66/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7f1762094f1564cb8ef81ac5dc660e5518e6465f8671ba971142490f2dd147f
|
|
4
|
+
data.tar.gz: ade593338a2c692be8b538f8bda660dbdb0ea396e4a3145e694d9853599ac76f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ef041fc031b03345a49645961d78064070a1935f0b46f99806713d97d88b44d0146e2fecf258a3d5d4b22afde3155d6ba37d57d3f6ce23e4be2b338b76cd247
|
|
7
|
+
data.tar.gz: b4ede46db994d02a169639f6305a10ae0bcfd9482403738da9a1e509d5687aee748b36ff69d66ace394a13c2355fe0a1b5d4a5b993a3bbf0f912d3dc19477d87
|
data/CHANGELOG.md
CHANGED
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
|
-
|
|
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 = []
|
data/lib/cloud66/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
72
|
+
rubygems_version: 3.5.22
|
|
73
73
|
signing_key:
|
|
74
74
|
specification_version: 4
|
|
75
75
|
summary: Cloud 66 Ruby plugin
|