judoscale-ruby 1.6.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/judoscale/config.rb +13 -3
- data/lib/judoscale/version.rb +1 -1
- metadata +4 -10
- data/Gemfile +0 -9
- data/Rakefile +0 -11
- data/judoscale-ruby.gemspec +0 -27
- data/lib/rails-autoscale-core.rb +0 -3
- data/rails-autoscale-core.gemspec +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f077c92d5dc20a234fde1eb25feb0588dc893ba16c412d97a722a5db8265915c
|
4
|
+
data.tar.gz: 84c19264a554e878a33a5653a55e9b36d970ce9f7a40a5f7f303c9e4c40deebf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be9f7e58118b35591634cf8ce62a18725d2a9b4bfd6b69c84ebf45a1c3558b57bd28ba80d5014ac27759689f46a81a70c95f5efb236e8dee23343c9540eb4744
|
7
|
+
data.tar.gz: 0b8c377c811282e0d82f70f3b228fca2bc91bfe660fe1b2d8a2888fbc2210049d25f997e6075711ee5adb4c34c026a6343309aca784c50cf91ad6a442b911236
|
data/lib/judoscale/config.rb
CHANGED
@@ -20,10 +20,12 @@ module Judoscale
|
|
20
20
|
UUID_REGEXP = /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/
|
21
21
|
DEFAULT_QUEUE_FILTER = ->(queue_name) { !UUID_REGEXP.match?(queue_name) }
|
22
22
|
|
23
|
-
attr_accessor :identifier, :enabled, :max_queues, :queues, :queue_filter
|
23
|
+
attr_accessor :identifier, :enabled, :max_queues, :queues, :queue_filter
|
24
|
+
attr_reader :track_busy_jobs
|
24
25
|
|
25
|
-
def initialize(identifier)
|
26
|
+
def initialize(identifier, support_busy_jobs: true)
|
26
27
|
@identifier = identifier
|
28
|
+
@support_busy_jobs = support_busy_jobs
|
27
29
|
reset
|
28
30
|
end
|
29
31
|
|
@@ -34,7 +36,15 @@ module Judoscale
|
|
34
36
|
|
35
37
|
# Support for deprecated legacy env var configs.
|
36
38
|
@max_queues = (ENV["RAILS_AUTOSCALE_MAX_QUEUES"] || 20).to_i
|
37
|
-
|
39
|
+
self.track_busy_jobs = ENV["RAILS_AUTOSCALE_LONG_JOBS"] == "true"
|
40
|
+
end
|
41
|
+
|
42
|
+
def track_busy_jobs=(value)
|
43
|
+
if value && !@support_busy_jobs
|
44
|
+
raise "[#{Config.instance.log_tag}] #{identifier} does not support busy jobs"
|
45
|
+
end
|
46
|
+
|
47
|
+
@track_busy_jobs = value
|
38
48
|
end
|
39
49
|
|
40
50
|
def as_json
|
data/lib/judoscale/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: judoscale-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam McCrea
|
@@ -10,7 +10,7 @@ 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
|
description:
|
16
16
|
email:
|
@@ -19,9 +19,6 @@ executables: []
|
|
19
19
|
extensions: []
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
|
-
- Gemfile
|
23
|
-
- Rakefile
|
24
|
-
- judoscale-ruby.gemspec
|
25
22
|
- lib/judoscale-ruby.rb
|
26
23
|
- lib/judoscale/adapter_api.rb
|
27
24
|
- lib/judoscale/config.rb
|
@@ -37,8 +34,6 @@ files:
|
|
37
34
|
- lib/judoscale/request_middleware.rb
|
38
35
|
- lib/judoscale/version.rb
|
39
36
|
- lib/judoscale/web_metrics_collector.rb
|
40
|
-
- lib/rails-autoscale-core.rb
|
41
|
-
- rails-autoscale-core.gemspec
|
42
37
|
homepage: https://judoscale.com
|
43
38
|
licenses:
|
44
39
|
- MIT
|
@@ -63,9 +58,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
58
|
- !ruby/object:Gem::Version
|
64
59
|
version: '0'
|
65
60
|
requirements: []
|
66
|
-
rubygems_version: 3.
|
61
|
+
rubygems_version: 3.5.11
|
67
62
|
signing_key:
|
68
63
|
specification_version: 4
|
69
|
-
summary:
|
70
|
-
web and worker dynos.
|
64
|
+
summary: Autoscaling for Ruby.
|
71
65
|
test_files: []
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/judoscale-ruby.gemspec
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require "judoscale/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "judoscale-ruby"
|
7
|
-
spec.version = Judoscale::VERSION
|
8
|
-
spec.authors = ["Adam McCrea", "Carlos Antonio da Silva", "Jon Sullivan"]
|
9
|
-
spec.email = ["hello@judoscale.com"]
|
10
|
-
|
11
|
-
spec.summary = "This gem works with the Judoscale Heroku add-on to automatically scale your web and worker dynos."
|
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
|
-
end
|
data/lib/rails-autoscale-core.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require "judoscale/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "rails-autoscale-core"
|
7
|
-
spec.version = Judoscale::VERSION
|
8
|
-
spec.authors = ["Adam McCrea", "Carlos Antonio da Silva", "Jon Sullivan"]
|
9
|
-
spec.email = ["hello@judoscale.com"]
|
10
|
-
|
11
|
-
spec.summary = "This gem works with the Judoscale Heroku add-on to automatically scale your web and worker dynos."
|
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
|
-
end
|