faktory_worker_ruby 1.3.0 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abc45bf7c07e61197705a9283c38e6d399a81701f433d8a5eded1e6cb6b480e3
4
- data.tar.gz: ac96de6c442ad806cf3cafa5fc839e5509454a8f315229f4014cddfcd9bbb28e
3
+ metadata.gz: fe9fd54ed547e42b198c7cf2e2f056203857f0f16a65aafe7126006102f86b3b
4
+ data.tar.gz: 9ce604181600566d5991a3e9419f8b48a68d1cf657e8731ef5440eeadff5c4e7
5
5
  SHA512:
6
- metadata.gz: ef6262279803c776c204d2efd58bb547617519bf8277a78e3a46f3789e39bff21220134556f8c209b3d7fd26eb85627b24062f721de3c87324acb0063ec778e4
7
- data.tar.gz: 6de7bd208b4ab94ab57b3513159c5ab047f5144fb6152365d52535e3274f8306a416a1124f1c299fe0269542bdb61670958323b8be2285face085f8e3f53ae35
6
+ metadata.gz: a344b74590b7e16f361fe2be34b69f1d7b07934f59cad91bc06b21dbc619638ac001591e3a5f3e91dabd57526ce1a612f3f28217fe8b61e28b3a29da3104cb0b
7
+ data.tar.gz: a23358b7b261355de860f811b33218704e0d1ee760b794dec7977137e3b2996c8badab2bf0d9d420d468ed539c4b07c6b893a7e99c761659187ae081a3343ef4
@@ -11,7 +11,7 @@ jobs:
11
11
  strategy:
12
12
  fail-fast: false
13
13
  matrix:
14
- ruby: ["2.6", "2.7", "3.0", "3.1"]
14
+ ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
15
15
  runs-on: ubuntu-latest
16
16
  services:
17
17
  faktory:
data/.standard.yml CHANGED
@@ -1,4 +1,4 @@
1
- ruby_version: 2.5.0
1
+ ruby_version: 2.7.0
2
2
  fix: true
3
3
  parallel: true
4
4
  ignore:
data/Changes.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changes
2
2
 
3
+ ## HEAD
4
+
5
+ - Allow more connections in pool [#455]
6
+ - Minimum Ruby version is now 2.7.
7
+ - Minimum Rails version is now 6.0.
8
+
3
9
  ## 1.3.0
4
10
 
5
11
  - Fix `faktory/testing` [#74]
data/Gemfile.lock CHANGED
@@ -1,69 +1,92 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faktory_worker_ruby (1.3.0)
4
+ faktory_worker_ruby (2.0.0)
5
5
  connection_pool (~> 2.2, >= 2.2.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activejob (7.0.4.3)
11
- activesupport (= 7.0.4.3)
10
+ activejob (7.1.3)
11
+ activesupport (= 7.1.3)
12
12
  globalid (>= 0.3.6)
13
- activesupport (7.0.4.3)
13
+ activesupport (7.1.3)
14
+ base64
15
+ bigdecimal
14
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ connection_pool (>= 2.2.5)
18
+ drb
15
19
  i18n (>= 1.6, < 2)
16
20
  minitest (>= 5.1)
21
+ mutex_m
17
22
  tzinfo (~> 2.0)
18
23
  ast (2.4.2)
19
- concurrent-ruby (1.2.2)
20
- connection_pool (2.4.0)
24
+ base64 (0.2.0)
25
+ bigdecimal (3.1.6)
26
+ concurrent-ruby (1.2.3)
27
+ connection_pool (2.4.1)
21
28
  docile (1.4.0)
22
- globalid (1.1.0)
23
- activesupport (>= 5.0)
24
- i18n (1.12.0)
29
+ drb (2.2.0)
30
+ ruby2_keywords
31
+ globalid (1.2.1)
32
+ activesupport (>= 6.1)
33
+ i18n (1.14.1)
25
34
  concurrent-ruby (~> 1.0)
26
- json (2.6.3)
35
+ json (2.7.1)
27
36
  language_server-protocol (3.17.0.3)
28
- minitest (5.18.0)
29
- minitest-hooks (1.5.0)
37
+ lint_roller (1.1.0)
38
+ minitest (5.21.2)
39
+ minitest-hooks (1.5.1)
30
40
  minitest (> 5.3)
31
- parallel (1.22.1)
32
- parser (3.2.2.0)
41
+ mutex_m (0.2.0)
42
+ parallel (1.24.0)
43
+ parser (3.3.0.4)
33
44
  ast (~> 2.4.1)
45
+ racc
46
+ racc (1.7.3)
34
47
  rainbow (3.1.1)
35
- rake (13.0.6)
36
- regexp_parser (2.7.0)
37
- rexml (3.2.5)
38
- rubocop (1.48.1)
48
+ rake (13.1.0)
49
+ regexp_parser (2.9.0)
50
+ rexml (3.2.6)
51
+ rubocop (1.59.0)
39
52
  json (~> 2.3)
53
+ language_server-protocol (>= 3.17.0)
40
54
  parallel (~> 1.10)
41
- parser (>= 3.2.0.0)
55
+ parser (>= 3.2.2.4)
42
56
  rainbow (>= 2.2.2, < 4.0)
43
57
  regexp_parser (>= 1.8, < 3.0)
44
58
  rexml (>= 3.2.5, < 4.0)
45
- rubocop-ast (>= 1.26.0, < 2.0)
59
+ rubocop-ast (>= 1.30.0, < 2.0)
46
60
  ruby-progressbar (~> 1.7)
47
61
  unicode-display_width (>= 2.4.0, < 3.0)
48
- rubocop-ast (1.28.0)
62
+ rubocop-ast (1.30.0)
49
63
  parser (>= 3.2.1.0)
50
- rubocop-performance (1.16.0)
51
- rubocop (>= 1.7.0, < 2.0)
52
- rubocop-ast (>= 0.4.0)
64
+ rubocop-performance (1.20.2)
65
+ rubocop (>= 1.48.1, < 2.0)
66
+ rubocop-ast (>= 1.30.0, < 2.0)
53
67
  ruby-progressbar (1.13.0)
68
+ ruby2_keywords (0.0.5)
54
69
  simplecov (0.22.0)
55
70
  docile (~> 1.1)
56
71
  simplecov-html (~> 0.11)
57
72
  simplecov_json_formatter (~> 0.1)
58
73
  simplecov-html (0.12.3)
59
74
  simplecov_json_formatter (0.1.4)
60
- standard (1.25.3)
75
+ standard (1.33.0)
61
76
  language_server-protocol (~> 3.17.0.2)
62
- rubocop (~> 1.48.1)
63
- rubocop-performance (~> 1.16.0)
77
+ lint_roller (~> 1.0)
78
+ rubocop (~> 1.59.0)
79
+ standard-custom (~> 1.0.0)
80
+ standard-performance (~> 1.3)
81
+ standard-custom (1.0.2)
82
+ lint_roller (~> 1.0)
83
+ rubocop (~> 1.50)
84
+ standard-performance (1.3.1)
85
+ lint_roller (~> 1.1)
86
+ rubocop-performance (~> 1.20.2)
64
87
  tzinfo (2.0.6)
65
88
  concurrent-ruby (~> 1.0)
66
- unicode-display_width (2.4.2)
89
+ unicode-display_width (2.5.0)
67
90
 
68
91
  PLATFORMS
69
92
  ruby
@@ -76,3 +99,6 @@ DEPENDENCIES
76
99
  rake
77
100
  simplecov
78
101
  standard
102
+
103
+ BUNDLED WITH
104
+ 2.4.22
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.executables = ["faktory-worker"]
13
13
  gem.files = `git ls-files | grep -Ev '^(test|myapp|examples)'`.split("\n")
14
14
  gem.version = Faktory::VERSION
15
- gem.required_ruby_version = ">= 2.5.0"
15
+ gem.required_ruby_version = ">= 2.7.0"
16
16
 
17
17
  gem.metadata = {
18
18
  "homepage_uri" => "https://contribsys.com/faktory",
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  }
24
24
 
25
25
  gem.add_dependency "connection_pool", "~> 2.2", ">= 2.2.2"
26
- gem.add_development_dependency "activejob", ">= 5.2.0"
26
+ gem.add_development_dependency "activejob", ">= 6.0.0"
27
27
  gem.add_development_dependency "minitest", "~> 5"
28
28
  gem.add_development_dependency "minitest-hooks"
29
29
  gem.add_development_dependency "rake"
@@ -347,9 +347,9 @@ module Faktory
347
347
  raise Errno::ECONNRESET, "No response" unless line
348
348
  chr = line[0]
349
349
  if chr == "+"
350
- line[1..-1].strip
350
+ line[1..].strip
351
351
  elsif chr == "$"
352
- count = line[1..-1].strip.to_i
352
+ count = line[1..].strip.to_i
353
353
  return nil if count == -1
354
354
  data = read(count) if count > 0
355
355
  _ = gets # read extra linefeeds
@@ -362,7 +362,7 @@ module Faktory
362
362
  #
363
363
  # -NOTUNIQUE Job not unique
364
364
  # We return ["NOTUNIQUE", "Job not unique"]
365
- err = line[1..-1].split(" ", 2)
365
+ err = line[1..].split(" ", 2)
366
366
  raise CommandError, err[1] if err[0] == "ERR"
367
367
  err
368
368
  else
@@ -6,7 +6,7 @@ module Faktory
6
6
  class Connection
7
7
  class << self
8
8
  def create(options = {})
9
- size = Faktory.worker? ? (Faktory.options[:concurrency] + 2) : 5
9
+ size = Faktory.worker? ? (Faktory.options[:concurrency] + 5) : 20
10
10
  ConnectionPool.new(timeout: options[:pool_timeout] || 1, size: size) do
11
11
  Faktory::Client.new(**options)
12
12
  end
data/lib/faktory/job.rb CHANGED
@@ -173,7 +173,7 @@ module Faktory
173
173
  m = "#{name}="
174
174
  undef_method(m) if method_defined?(m) || private_method_defined?(m)
175
175
  end
176
- define_singleton_method("#{name}=") do |val|
176
+ define_singleton_method(:"#{name}=") do |val|
177
177
  singleton_class.class_eval do
178
178
  undef_method(name) if method_defined?(name) || private_method_defined?(name)
179
179
  define_method(name) { val }
@@ -62,7 +62,7 @@ module Faktory
62
62
  end
63
63
 
64
64
  def self.logger=(log)
65
- @logger = (log || Logger.new(File::NULL))
65
+ @logger = log || Logger.new(File::NULL)
66
66
  end
67
67
 
68
68
  def logger
data/lib/faktory/rails.rb CHANGED
@@ -22,7 +22,7 @@ module Faktory
22
22
  # None of this matters on the client-side, only within the Faktory executor itself.
23
23
  #
24
24
  Faktory.configure_worker do |_|
25
- if ::Rails::VERSION::MAJOR < 5
25
+ if ::Rails::VERSION::MAJOR < 6
26
26
  raise "Your current version of Rails, #{::Rails::VERSION::STRING}, is not supported"
27
27
  end
28
28
 
@@ -58,9 +58,9 @@ module Faktory
58
58
  end
59
59
  end
60
60
 
61
- if defined?(::Rails) && ::Rails::VERSION::MAJOR < 5
61
+ if defined?(::Rails) && ::Rails::VERSION::MAJOR < 6
62
62
  warn("**************************************************")
63
- warn("🚫 ERROR: Faktory Worker does not support Rails versions under 5.x - please ensure your workers are updated")
63
+ warn("🚫 ERROR: Faktory Worker does not support Rails version < 6.x")
64
64
  warn("**************************************************")
65
65
  warn("")
66
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faktory
4
- VERSION = "1.3.0"
4
+ VERSION = "2.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faktory_worker_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-31 00:00:00.000000000 Z
11
+ date: 2024-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 5.2.0
39
+ version: 6.0.0
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 5.2.0
46
+ version: 6.0.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: minitest
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -147,14 +147,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - ">="
149
149
  - !ruby/object:Gem::Version
150
- version: 2.5.0
150
+ version: 2.7.0
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.4.7
157
+ rubygems_version: 3.4.20
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Ruby worker for Faktory