judoscale-ruby 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2abe20e81129ebfd711272ee0b76533612704e147444efbf7c50669945803ca
4
- data.tar.gz: 49e29c1381f994cab33e9c68274426fcf8fe40486bffb4ce940d938da05b7352
3
+ metadata.gz: '06194dfe279e17d98193bfaeca3cb8062c49013bcc8b3b6acfa41d008df0a2f1'
4
+ data.tar.gz: 11848e472c87771c4dc3be406c33bbb93ad60f6ba9a7ea7dd2cafd09c147e98e
5
5
  SHA512:
6
- metadata.gz: 444b5c9e06aec1b7c1ea802eea5c202cf32b078d168663e0431e023b498b13d490a4677bd5dba9876836adf228ede65fb60d50b985f8914b06fc652b94617ad5
7
- data.tar.gz: 3bee505922145e6c185677794fc1934414b799f4389a5368fbe37d91af6ccc87dc4480a2657cf69eb46474a8e0167e648b4483040a856fa346aca39be906b59e
6
+ metadata.gz: 111005d7d66e4d649046d27e810ed3ab231a59d7a766f810d471ba3fd79ef2964598fd59a11a41c6734329f33a322827c0c811847f1aa398e49898cb581f9765
7
+ data.tar.gz: cc0c3826fafa4055375e798a90c716dd725e41e5826bcd713782b389567ab1ffaa4709bee20b1f2240c3fb7b301a03af81ff88f7e1c52b5334ca7244aaf23c16
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Adam McCrea", "Carlos Antonio da Silva", "Jon Sullivan"]
9
9
  spec.email = ["hello@judoscale.com"]
10
10
 
11
- spec.summary = "This gem works with the Judoscale Heroku add-on to automatically scale your web and worker dynos."
11
+ spec.summary = "Autoscaling for Ruby."
12
12
  spec.homepage = "https://judoscale.com"
13
13
  spec.license = "MIT"
14
14
 
@@ -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, :track_busy_jobs
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
- @track_busy_jobs = ENV["RAILS_AUTOSCALE_LONG_JOBS"] == "true"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Judoscale
4
- VERSION = "1.6.0"
4
+ VERSION = "1.7.0"
5
5
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Adam McCrea", "Carlos Antonio da Silva", "Jon Sullivan"]
9
9
  spec.email = ["hello@judoscale.com"]
10
10
 
11
- spec.summary = "This gem works with the Judoscale Heroku add-on to automatically scale your web and worker dynos."
11
+ spec.summary = "Autoscaling for Ruby."
12
12
  spec.homepage = "https://judoscale.com"
13
13
  spec.license = "MIT"
14
14
 
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.6.0
4
+ version: 1.7.0
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-04-26 00:00:00.000000000 Z
13
+ date: 2024-05-03 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description:
16
16
  email:
@@ -66,6 +66,5 @@ requirements: []
66
66
  rubygems_version: 3.4.10
67
67
  signing_key:
68
68
  specification_version: 4
69
- summary: This gem works with the Judoscale Heroku add-on to automatically scale your
70
- web and worker dynos.
69
+ summary: Autoscaling for Ruby.
71
70
  test_files: []