rails-autoscale-shoryuken 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-autoscale-shoryuken.rb +1 -1
- metadata +7 -29
- data/Gemfile +0 -10
- data/Rakefile +0 -10
- data/judoscale-shoryuken.gemspec +0 -30
- data/lib/judoscale/shoryuken/metrics_collector.rb +0 -36
- data/lib/judoscale/shoryuken/version.rb +0 -7
- data/lib/judoscale/shoryuken.rb +0 -15
- data/lib/judoscale-shoryuken.rb +0 -3
- data/rails-autoscale-shoryuken.gemspec +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93ce82e3ba1ca72b07c08dd96aa7ec2e018d7b5761b5d007f29bb4368d45d4b0
|
4
|
+
data.tar.gz: 29ae19e7e0975bfe65d65dcf6295e9a1ab1271aa8ef668d623b5060caf48e2ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c267d18b4bb0c73d8fdd587898d8a4d97afd958142db50635ef2bb70fe7ff007891b72dddeb1d10200d7995247672a0facc32438f2ed692ef8cb5dbb07eff7aa
|
7
|
+
data.tar.gz: 14758e2a3395b4546dcaae4939a1374315102874ae57ae439277be0a6d100ca8e55550e600606d3d3263f382a5bd4b17a3fd0bbae1fdc20701fa8513defadf5c
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-autoscale-shoryuken
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam McCrea
|
@@ -10,36 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-07-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: judoscale-shoryuken
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.7.
|
21
|
+
version: 1.7.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.7.
|
29
|
-
- !ruby/object:Gem::Dependency
|
30
|
-
name: shoryuken
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ">="
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '6.0'
|
36
|
-
type: :runtime
|
37
|
-
prerelease: false
|
38
|
-
version_requirements: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '6.0'
|
28
|
+
version: 1.7.1
|
43
29
|
description:
|
44
30
|
email:
|
45
31
|
- hello@judoscale.com
|
@@ -47,15 +33,7 @@ executables: []
|
|
47
33
|
extensions: []
|
48
34
|
extra_rdoc_files: []
|
49
35
|
files:
|
50
|
-
- Gemfile
|
51
|
-
- Rakefile
|
52
|
-
- judoscale-shoryuken.gemspec
|
53
|
-
- lib/judoscale-shoryuken.rb
|
54
|
-
- lib/judoscale/shoryuken.rb
|
55
|
-
- lib/judoscale/shoryuken/metrics_collector.rb
|
56
|
-
- lib/judoscale/shoryuken/version.rb
|
57
36
|
- lib/rails-autoscale-shoryuken.rb
|
58
|
-
- rails-autoscale-shoryuken.gemspec
|
59
37
|
homepage: https://judoscale.com
|
60
38
|
licenses:
|
61
39
|
- MIT
|
@@ -73,14 +51,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
51
|
requirements:
|
74
52
|
- - ">="
|
75
53
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
54
|
+
version: '0'
|
77
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
56
|
requirements:
|
79
57
|
- - ">="
|
80
58
|
- !ruby/object:Gem::Version
|
81
59
|
version: '0'
|
82
60
|
requirements: []
|
83
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.5.11
|
84
62
|
signing_key:
|
85
63
|
specification_version: 4
|
86
64
|
summary: Autoscaling for Shoryuken workers.
|
data/Gemfile
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec name: "judoscale-shoryuken"
|
4
|
-
|
5
|
-
gem "judoscale-ruby", path: "../judoscale-ruby"
|
6
|
-
gem "shoryuken", "~> 6.2"
|
7
|
-
gem "aws-sdk-sqs" # shoryuken integration with AWS SDK v3+
|
8
|
-
gem "rexml" # aws-sdk-core requires an XML parser.
|
9
|
-
gem "minitest"
|
10
|
-
gem "rake"
|
data/Rakefile
DELETED
data/judoscale-shoryuken.gemspec
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require "judoscale/shoryuken/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "judoscale-shoryuken"
|
7
|
-
spec.version = Judoscale::Shoryuken::VERSION
|
8
|
-
spec.authors = ["Adam McCrea", "Carlos Antonio da Silva", "Jon Sullivan"]
|
9
|
-
spec.email = ["hello@judoscale.com"]
|
10
|
-
|
11
|
-
spec.summary = "Autoscaling for Shoryuken workers."
|
12
|
-
spec.homepage = "https://judoscale.com"
|
13
|
-
spec.license = "MIT"
|
14
|
-
|
15
|
-
spec.metadata = {
|
16
|
-
"homepage_uri" => "https://judoscale.com",
|
17
|
-
"bug_tracker_uri" => "https://github.com/judoscale/judoscale-ruby/issues",
|
18
|
-
"documentation_uri" => "https://judoscale.com/docs",
|
19
|
-
"changelog_uri" => "https://github.com/judoscale/judoscale-ruby/blob/main/CHANGELOG.md",
|
20
|
-
"source_code_uri" => "https://github.com/judoscale/judoscale-ruby"
|
21
|
-
}
|
22
|
-
|
23
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
-
spec.require_paths = ["lib"]
|
25
|
-
|
26
|
-
spec.required_ruby_version = ">= 2.6.0"
|
27
|
-
|
28
|
-
spec.add_dependency "judoscale-ruby", Judoscale::Shoryuken::VERSION
|
29
|
-
spec.add_dependency "shoryuken", ">= 6.0"
|
30
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "judoscale/job_metrics_collector"
|
4
|
-
require "judoscale/metric"
|
5
|
-
|
6
|
-
module Judoscale
|
7
|
-
module Shoryuken
|
8
|
-
class MetricsCollector < Judoscale::JobMetricsCollector
|
9
|
-
SQS_QUEUE_DEPTH_ATTRIBUTE = "ApproximateNumberOfMessages"
|
10
|
-
|
11
|
-
def self.adapter_config
|
12
|
-
Judoscale::Config.instance.shoryuken
|
13
|
-
end
|
14
|
-
|
15
|
-
def collect
|
16
|
-
metrics = []
|
17
|
-
self.queues |= ::Shoryuken.ungrouped_queues
|
18
|
-
|
19
|
-
queues.each do |queue_name|
|
20
|
-
queue = ::Shoryuken::Client.queues(queue_name)
|
21
|
-
|
22
|
-
# Reach out to SQS client directly to fetch the queue attribute we need to report.
|
23
|
-
# Shoryuken has a private `queue_attributes` API to fetch all attributes, this call mimics that.
|
24
|
-
sqs_queue_attributes = ::Shoryuken.sqs_client
|
25
|
-
.get_queue_attributes(queue_url: queue.url, attribute_names: [SQS_QUEUE_DEPTH_ATTRIBUTE])
|
26
|
-
depth = sqs_queue_attributes.attributes[SQS_QUEUE_DEPTH_ATTRIBUTE]
|
27
|
-
|
28
|
-
metrics.push Metric.new(:qd, depth, Time.now, queue_name)
|
29
|
-
end
|
30
|
-
|
31
|
-
log_collection(metrics)
|
32
|
-
metrics
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
data/lib/judoscale/shoryuken.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "judoscale-ruby"
|
4
|
-
require "judoscale/config"
|
5
|
-
require "judoscale/shoryuken/version"
|
6
|
-
require "judoscale/shoryuken/metrics_collector"
|
7
|
-
require "shoryuken"
|
8
|
-
|
9
|
-
Judoscale.add_adapter :"judoscale-shoryuken",
|
10
|
-
{
|
11
|
-
adapter_version: Judoscale::Shoryuken::VERSION,
|
12
|
-
framework_version: ::Shoryuken::VERSION
|
13
|
-
},
|
14
|
-
metrics_collector: Judoscale::Shoryuken::MetricsCollector,
|
15
|
-
expose_config: Judoscale::Config::JobAdapterConfig.new(:shoryuken, support_busy_jobs: false)
|
data/lib/judoscale-shoryuken.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require "judoscale/shoryuken/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "rails-autoscale-shoryuken"
|
7
|
-
spec.version = Judoscale::Shoryuken::VERSION
|
8
|
-
spec.authors = ["Adam McCrea", "Carlos Antonio da Silva", "Jon Sullivan"]
|
9
|
-
spec.email = ["hello@judoscale.com"]
|
10
|
-
|
11
|
-
spec.summary = "Autoscaling for Shoryuken workers."
|
12
|
-
spec.homepage = "https://judoscale.com"
|
13
|
-
spec.license = "MIT"
|
14
|
-
|
15
|
-
spec.metadata = {
|
16
|
-
"homepage_uri" => "https://judoscale.com",
|
17
|
-
"bug_tracker_uri" => "https://github.com/judoscale/judoscale-ruby/issues",
|
18
|
-
"documentation_uri" => "https://judoscale.com/docs",
|
19
|
-
"changelog_uri" => "https://github.com/judoscale/judoscale-ruby/blob/main/CHANGELOG.md",
|
20
|
-
"source_code_uri" => "https://github.com/judoscale/judoscale-ruby"
|
21
|
-
}
|
22
|
-
|
23
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
-
spec.require_paths = ["lib"]
|
25
|
-
|
26
|
-
spec.required_ruby_version = ">= 2.6.0"
|
27
|
-
|
28
|
-
spec.add_dependency "rails-autoscale-core", Judoscale::Shoryuken::VERSION
|
29
|
-
spec.add_dependency "shoryuken", ">= 6.0"
|
30
|
-
end
|