workhorse 1.2.17.rc2 → 1.2.17

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: ce2281ae514ba5f269328c38dd0a2e9bf0f76e2c26be09f4be467b1f818f5dec
4
- data.tar.gz: 3315c9047af3bf707d23d5309b65a602474342f6c0081f329cd0582d18b7720f
3
+ metadata.gz: 7c3223be9f4d677fa59d215519c9b96e933e5ab37f3ad96e904cd6dc91b59488
4
+ data.tar.gz: c30eaa0c15cd8785caf0aab8800de9c8838ff62d9192e1d8d9e8a386659322e1
5
5
  SHA512:
6
- metadata.gz: 2047809f4fe65fca5f5eaee641b5868846098e381a18d5d1d07a4a9fe3e0d94a709185b13e7cf79c3094eaed5f908aac7399abcb4488a13b288379f414a8fdf7
7
- data.tar.gz: fdca924627efb8ab50938b43ac76873d5bc0a5e794484a8a1e1b7fa4afba4fe86aa4003c2ccba6ff63b9a977503f9a63f818e536bc07bc34c987be52b3580793
6
+ metadata.gz: 9d79e67c853bf5b258ccc2d334de5c746c046b6fca063907cdc3e0a8693e641d12cbefb3ce408f69f697dd1b8f7b0ee4e6ccfcd98ed4b86210786ee53bf23e01
7
+ data.tar.gz: eca0f05a85ed9a9afaeb0d146b8243b02c3d8bd5cf1229488eacae4437494df1554ce7c2f0cf2f97118b8024d2698d6d054aef3039ab19a253497e4a6caab54f
@@ -12,7 +12,13 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- ruby-version: ['2.5.1', '2.6.2', '2.7.1', '3.0.1']
15
+ ruby-version:
16
+ - '2.5.1'
17
+ - '2.6.2'
18
+ - '2.7.1'
19
+ - '3.0.1'
20
+ - '3.1.2'
21
+ - '3.2.1'
16
22
  env:
17
23
  DB_DATABASE: workhorse
18
24
  DB_USER: root
@@ -20,22 +26,32 @@ jobs:
20
26
  DB_HOST: localhost
21
27
 
22
28
  steps:
23
- - uses: actions/checkout@v2
24
- - name: Set up Ruby
25
- uses: ruby/setup-ruby@v1
26
- with:
27
- ruby-version: ${{ matrix.ruby-version }}
28
- bundler-cache: true
29
- - name: Startup database
30
- run: |
31
- sudo /etc/init.d/mysql start
32
- mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE ${{ env.DB_DATABASE }};'
33
- - name: Run rake tests
34
- uses: nick-fields/retry@v2
35
- with:
36
- timeout_seconds: 120
37
- retry_on: error
38
- max_attempts: 3
39
- command: bundle exec rake test TESTOPTS='--verbose'
40
- - name: Run rubocop
41
- run: bundle exec rubocop
29
+ - uses: actions/checkout@v2
30
+ - name: Set up Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: ${{ matrix.ruby-version }}
34
+ bundler-cache: true
35
+ - name: Startup database
36
+ run: |
37
+ sudo /etc/init.d/mysql start
38
+ mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE ${{ env.DB_DATABASE }};'
39
+ - name: Run rake tests
40
+ uses: nick-fields/retry@v2
41
+ with:
42
+ timeout_seconds: 120
43
+ retry_on: error
44
+ max_attempts: 3
45
+ command: bundle exec rake test TESTOPTS='--verbose'
46
+
47
+ linters:
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - uses: actions/checkout@v2
51
+ - name: Set up Ruby
52
+ uses: ruby/setup-ruby@v1
53
+ with:
54
+ ruby-version: 2.5.1
55
+ bundler-cache: true
56
+ - name: Run rubocop
57
+ run: bundle exec rubocop
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Workhorse Changelog
2
2
 
3
+ ## 1.2.17 - 2024-02-21
4
+
5
+ * Stable release based on previous RC releases.
6
+
3
7
  ## 1.2.17.rc2 - 2024-02-08
4
8
 
5
9
  * Remove unnecessary output from `watch` command in certain cases.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.17.rc2
1
+ 1.2.17
@@ -102,12 +102,10 @@ class WorkhorseTest < ActiveSupport::TestCase
102
102
  @daemon = Workhorse::Daemon.new(pidfile: 'tmp/pids/test%s.pid') do |d|
103
103
  workers.times do |i|
104
104
  d.worker "Test Worker #{i}" do
105
- begin
106
- Workhorse::Worker.start_and_wait(
107
- pool_size: 1,
108
- polling_interval: 0.1
109
- )
110
- end
105
+ Workhorse::Worker.start_and_wait(
106
+ pool_size: 1,
107
+ polling_interval: 0.1
108
+ )
111
109
  end
112
110
  end
113
111
  end
@@ -130,7 +128,8 @@ class WorkhorseTest < ActiveSupport::TestCase
130
128
  end
131
129
 
132
130
  def capture_stderr
133
- old, $stderr = $stderr, StringIO.new
131
+ old = $stderr
132
+ $stderr = StringIO.new
134
133
  yield
135
134
  $stderr.string
136
135
  ensure
@@ -16,6 +16,9 @@ class Workhorse::DaemonTest < WorkhorseTest
16
16
  # Kill first worker
17
17
  Process.kill 'KILL', daemon.workers.first.pid
18
18
 
19
+ # Short sleep to let the `KILL` propagate
20
+ sleep 0.2
21
+
19
22
  # Watch
20
23
  assert_watch_output(
21
24
  'Worker #1 (Test Worker 0): Starting (stale pid file)',
@@ -28,7 +31,7 @@ class Workhorse::DaemonTest < WorkhorseTest
28
31
  with_daemon 2 do
29
32
  # Kill first worker
30
33
  kill daemon.workers.first.pid
31
- FileUtils.rm "tmp/pids/test1.pid"
34
+ FileUtils.rm 'tmp/pids/test1.pid'
32
35
 
33
36
  # Watch
34
37
  assert_watch_output(
@@ -59,7 +62,7 @@ class Workhorse::DaemonTest < WorkhorseTest
59
62
  with_daemon 4 do
60
63
  # Worker 0: Kill, remove PID
61
64
  kill daemon.workers[0].pid
62
- FileUtils.rm "tmp/pids/test1.pid"
65
+ FileUtils.rm 'tmp/pids/test1.pid'
63
66
 
64
67
  # Worker 1: Kill, keep PID
65
68
  kill daemon.workers[1].pid
@@ -181,7 +181,7 @@ class Workhorse::WorkerTest < WorkhorseTest
181
181
  end
182
182
 
183
183
  def test_controlled_shutdown
184
- Workhorse.max_worker_memory_mb = 50
184
+ Workhorse.max_worker_memory_mb = 100
185
185
  with_daemon do
186
186
  pid = with_retries do
187
187
  pid = daemon.workers.first.pid
data/workhorse.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: workhorse 1.2.17.rc2 ruby lib
2
+ # stub: workhorse 1.2.17 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "workhorse".freeze
6
- s.version = "1.2.17.rc2"
6
+ s.version = "1.2.17"
7
7
 
8
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1".freeze) if s.respond_to? :required_rubygems_version=
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2024-02-08"
11
+ s.date = "2024-02-21"
12
12
  s.files = [".github/workflows/ruby.yml".freeze, ".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, "CHANGELOG.md".freeze, "FAQ.md".freeze, "Gemfile".freeze, "LICENSE".freeze, "README.md".freeze, "RUBY_VERSION".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/rubocop".freeze, "lib/active_job/queue_adapters/workhorse_adapter.rb".freeze, "lib/generators/workhorse/install_generator.rb".freeze, "lib/generators/workhorse/templates/bin/workhorse.rb".freeze, "lib/generators/workhorse/templates/config/initializers/workhorse.rb".freeze, "lib/generators/workhorse/templates/create_table_jobs.rb".freeze, "lib/workhorse.rb".freeze, "lib/workhorse/active_job_extension.rb".freeze, "lib/workhorse/daemon.rb".freeze, "lib/workhorse/daemon/shell_handler.rb".freeze, "lib/workhorse/db_job.rb".freeze, "lib/workhorse/enqueuer.rb".freeze, "lib/workhorse/jobs/cleanup_succeeded_jobs.rb".freeze, "lib/workhorse/jobs/detect_stale_jobs_job.rb".freeze, "lib/workhorse/jobs/run_active_job.rb".freeze, "lib/workhorse/jobs/run_rails_op.rb".freeze, "lib/workhorse/performer.rb".freeze, "lib/workhorse/poller.rb".freeze, "lib/workhorse/pool.rb".freeze, "lib/workhorse/scoped_env.rb".freeze, "lib/workhorse/worker.rb".freeze, "test/active_job/queue_adapters/workhorse_adapter_test.rb".freeze, "test/lib/db_schema.rb".freeze, "test/lib/jobs.rb".freeze, "test/lib/test_helper.rb".freeze, "test/workhorse/daemon_test.rb".freeze, "test/workhorse/db_job_test.rb".freeze, "test/workhorse/enqueuer_test.rb".freeze, "test/workhorse/performer_test.rb".freeze, "test/workhorse/poller_test.rb".freeze, "test/workhorse/pool_test.rb".freeze, "test/workhorse/worker_test.rb".freeze, "workhorse.gemspec".freeze]
13
13
  s.rubygems_version = "3.4.6".freeze
14
14
  s.summary = "Multi-threaded job backend with database queuing for ruby.".freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workhorse
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.17.rc2
4
+ version: 1.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-08 00:00:00.000000000 Z
11
+ date: 2024-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,8 +178,8 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
- description:
182
- email:
181
+ description:
182
+ email:
183
183
  executables: []
184
184
  extensions: []
185
185
  extra_rdoc_files: []
@@ -229,10 +229,10 @@ files:
229
229
  - test/workhorse/pool_test.rb
230
230
  - test/workhorse/worker_test.rb
231
231
  - workhorse.gemspec
232
- homepage:
232
+ homepage:
233
233
  licenses: []
234
234
  metadata: {}
235
- post_install_message:
235
+ post_install_message:
236
236
  rdoc_options: []
237
237
  require_paths:
238
238
  - lib
@@ -243,12 +243,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
- - - ">"
246
+ - - ">="
247
247
  - !ruby/object:Gem::Version
248
- version: 1.3.1
248
+ version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.4.10
251
- signing_key:
250
+ rubygems_version: 3.4.6
251
+ signing_key:
252
252
  specification_version: 4
253
253
  summary: Multi-threaded job backend with database queuing for ruby.
254
254
  test_files: