autoscale-queue-sidekiq 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE +19 -0
- data/README.md +31 -0
- data/lib/autoscale/queue/sidekiq/version.rb +7 -0
- data/lib/autoscale/queue/sidekiq.rb +16 -0
- data/lib/autoscale-queue-sidekiq.rb +1 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2070c6987e6197fd0008dd099491dfb2bbfa471b6e760ac20001352beb57becd
|
4
|
+
data.tar.gz: 972f14cd771d52e17ebe82341531a07082e254c2d303f44aabef4e0239f973d9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d3e89642192cdd2e1ca9e8be31a07ec25ece441dcc8f4d9691312acb97381cec80f17757eb648f3f24cefca73b9c8a667ac6162454d3d82b83e399a0f1070f41
|
7
|
+
data.tar.gz: 2169f3b517a8c026d7a62383e72074f952878f4ae3ddf8c6b3b548cf3fea77f89b10ff8a5e0aa8f0832472c25af587192deeb2fcabe093579be3232a7f175351
|
data/CHANGELOG.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2023 Michael R. van Rooijen, Autoscale.app
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Ruby Queue Sidekiq (Autoscale.app)
|
2
|
+
|
3
|
+
Produces [Sidekiq] queue metrics for the [Autoscale.app] [Agent].
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add the gem to your `Gemfile`:
|
8
|
+
|
9
|
+
bundle add autoscale-queue-sidekiq --version "~> 0"
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
Instructions are provided during the autoscaler setup process on [Autoscale.app].
|
14
|
+
|
15
|
+
## Development
|
16
|
+
|
17
|
+
Prepare environment:
|
18
|
+
|
19
|
+
bin/setup
|
20
|
+
|
21
|
+
See Rake for relevant tasks:
|
22
|
+
|
23
|
+
bin/rake -T
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/autoscale-app/ruby-queue-sidekiq
|
28
|
+
|
29
|
+
[Autoscale.app]: https://autoscale.app
|
30
|
+
[Agent]: https://github.com/autoscale-app/ruby-agent
|
31
|
+
[Sidekiq]: https://sidekiq.org
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative "sidekiq/version"
|
2
|
+
|
3
|
+
require "sidekiq/api"
|
4
|
+
|
5
|
+
module Autoscale
|
6
|
+
module Queue
|
7
|
+
module Sidekiq
|
8
|
+
def latency(*queues)
|
9
|
+
queues = ::Sidekiq::Queue.all.map(&:name) if queues.empty?
|
10
|
+
queues.map { |queue| ::Sidekiq::Queue.new(queue).latency }.max.round
|
11
|
+
end
|
12
|
+
|
13
|
+
module_function :latency
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require_relative "autoscale/queue/sidekiq"
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: autoscale-queue-sidekiq
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael R. van Rooijen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sidekiq
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '8'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '6'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '8'
|
33
|
+
description:
|
34
|
+
email:
|
35
|
+
- support@autoscale.app
|
36
|
+
executables: []
|
37
|
+
extensions: []
|
38
|
+
extra_rdoc_files: []
|
39
|
+
files:
|
40
|
+
- CHANGELOG.md
|
41
|
+
- LICENSE
|
42
|
+
- README.md
|
43
|
+
- lib/autoscale-queue-sidekiq.rb
|
44
|
+
- lib/autoscale/queue/sidekiq.rb
|
45
|
+
- lib/autoscale/queue/sidekiq/version.rb
|
46
|
+
homepage: https://autoscale.app
|
47
|
+
licenses:
|
48
|
+
- MIT
|
49
|
+
metadata:
|
50
|
+
homepage_uri: https://autoscale.app
|
51
|
+
documentation_uri: https://rubydoc.info/gems/autoscale-queue-sidekiq
|
52
|
+
source_code_uri: https://github.com/autoscale-app/ruby-queue-sidekiq
|
53
|
+
changelog_uri: https://github.com/autoscale-app/ruby-queue-sidekiq/blob/master/CHANGELOG.md
|
54
|
+
bug_tracker_uri: https://github.com/autoscale-app/ruby-queue-sidekiq/issues
|
55
|
+
rubygems_mfa_required: 'true'
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options: []
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 2.7.0
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
requirements: []
|
71
|
+
rubygems_version: 3.4.6
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Produces Sidekiq queue metrics for the Autoscale.app Agent
|
75
|
+
test_files: []
|