workhorse 2.0.0.rc1 → 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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -56
  3. data/VERSION +1 -1
  4. data/workhorse.gemspec +3 -3
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84d0f28bfeb67292f3de373115ada4ef7c2cff27b29e847af29326733ba89841
4
- data.tar.gz: f69f1d82c2c9c15f47f87d8f8390c31e655596636383b9cadefc8c240d8f43b6
3
+ metadata.gz: 0ca6c8e15a44efebbcbdc4af242c10397aeba1a20baa3b3c45af4025a657bafe
4
+ data.tar.gz: f342e2b53fb79ea99982101e5fc6912baacfe2fa19b6ad97cc3dd9a5922214f1
5
5
  SHA512:
6
- metadata.gz: 00c490f9e4aa2b57066b8b974e38286509cb156cb27f79dc7d7a355c9797338eaa8dcf33a5dc9c07e2f3bbe37878d0be5e82b7f098da9e45194ad0fe5b064d6f
7
- data.tar.gz: e0116907c47ae31d9fa5a5626e331a503286667966aa974255e8d9f816c363fe3a9e55406e5f79c9a3da7e82abe4b0648b505de3e279992a58e1864d847edaef
6
+ metadata.gz: e3c898ab631105ce71355032551dd70c94c4a357b17314258756c982c7f06e9e12cc89732c351030a20b5709ff1cfb99a78b123377572637e4ac03d0a0c165bb
7
+ data.tar.gz: 5b90517edcd626f792a1861cac9a513b83ff7846a92bcc00c289c03596a0b3255141f59ce3a51e9b1d724d2f425c648c4fb6dfac76a43a17ef757c49fc73509b
data/CHANGELOG.md CHANGED
@@ -1,65 +1,13 @@
1
1
  # Workhorse Changelog
2
2
 
3
- ## 2.0.0.rc1 - 2026-09-30
4
-
5
- Sitrox reference: #154443.
6
-
7
- ### Added
8
-
9
- * Oracle 12c or later is supported again, and is now covered by CI against
10
- `activerecord-oracle_enhanced-adapter` rather than only by hand. The global
11
- lock uses `DBMS_LOCK`, and the generated migrations leave out the index
12
- prefix lengths Oracle rejects while naming every index within the 30
13
- characters it allows before 12.2. See
14
- [Database support](README.md#database-support).
15
-
16
- 2.0.0.rc0 dropped Oracle; anyone who took that release up and needs it can
17
- move straight to this one. Grant the schema execute permission on
18
- `DBMS_LOCK`, as described under Database support.
19
-
20
- ### Fixed
21
-
22
- * On Oracle, jobs are picked up in priority order. 1.x limited the rows it
23
- selected by filtering on `ROWNUM`, which Oracle numbers before sorting, so
24
- both the job taken from each queue and the jobs a poll picked up were an
25
- arbitrary subset regardless of `priority`. Limiting now uses
26
- `FETCH FIRST … ROWS ONLY`, which applies after the sort and is why 12c is
27
- now the minimum.
28
-
29
- * A poll that finds the global lock taken now waits for it with a polling
30
- interval below half a second. The lock timeout follows the interval, and
31
- MySQL and Oracle take it as whole seconds, so they rounded it down to not
32
- waiting at all - only MariaDB honours a fraction. Each such poll gave up
33
- at once and counted towards `Workhorse.max_global_lock_fails`, so several
34
- workers contending for the lock could trigger its alarm about a crashed
35
- worker. The timeout is now rounded up to whole seconds.
36
-
37
- * A soft restart (`USR1`) no longer wedges a worker whose `tmp/pids` does not
38
- exist yet, as on a fresh checkout or deployment. The worker touched its
39
- shutdown file there after it had stopped accepting jobs, so failing on it
40
- left a worker that took no jobs and never exited. The directory is now
41
- created when missing, and a shutdown file that still cannot be written no
42
- longer holds up the shutdown. The heartbeat and the memory-limit shutdown,
43
- which write to the same directory, create it as well.
44
-
45
- * `Workhorse.clean_stuck_jobs` works on Oracle. It is built on splitting
46
- `locked_by` into host, PID and random component, which was written with
47
- MySQL's `substring_index` and so raised on Oracle for as long as the option
48
- has existed — visible only to an installation that turned it on, as it is
49
- off by default.
50
-
51
- ## 2.0.0.rc0 - 2026-09-29
3
+ ## 2.0.0 - 2026-10-14
52
4
 
53
5
  Sitrox reference: #154443.
54
6
 
55
7
  ### Breaking changes
56
8
 
57
- * **Support for Oracle is dropped.** Workhorse supports MySQL and MariaDB
58
- only. The Oracle branches of the global lock, the row limiting and the
59
- generated migrations are gone, along with
60
- `Workhorse::Poller::ORACLE_LOCK_MODE` and `ORACLE_LOCK_HANDLE`. It was never
61
- covered by CI, so it only ever had manual verification. An Oracle
62
- installation has no upgrade path and should stay on 1.x. See
9
+ * Oracle 12c is the minimum, as job selection now limits its rows with
10
+ `FETCH FIRST … ROWS ONLY` (see the priority fix below). See
63
11
  [Database support](README.md#database-support).
64
12
 
65
13
  * A forked daemon worker no longer runs the `at_exit` handlers registered by
@@ -108,7 +56,9 @@ Sitrox reference: #154443.
108
56
  * The composite indexes `[state, perform_at]`, `[state, priority, created_at]`
109
57
  and `[state, expires_at]` in the generated `jobs` migration, replacing the
110
58
  single-column index on `state`. `rails generate workhorse:install` now emits
111
- two migrations rather than one.
59
+ two migrations rather than one. On Oracle, the generated migrations leave
60
+ out the index prefix lengths Oracle rejects and name every index within the
61
+ 30 characters it allows before 12.2.
112
62
 
113
63
  * `fugit` as a runtime dependency, for parsing cron expressions.
114
64
 
@@ -127,8 +77,40 @@ Sitrox reference: #154443.
127
77
 
128
78
  * `Workhorse::DbJob#reset!` accepts `expired` as the terminal state it is.
129
79
 
80
+ * Oracle is covered by CI against `activerecord-oracle_enhanced-adapter`
81
+ rather than only by hand.
82
+
130
83
  ### Fixed
131
84
 
85
+ * On Oracle, jobs are picked up in priority order. 1.x limited the rows it
86
+ selected by filtering on `ROWNUM`, which Oracle numbers before sorting, so
87
+ both the job taken from each queue and the jobs a poll picked up were an
88
+ arbitrary subset regardless of `priority`. Limiting now uses
89
+ `FETCH FIRST … ROWS ONLY`, which applies after the sort and is why 12c is
90
+ now the minimum.
91
+
92
+ * A poll that finds the global lock taken now waits for it with a polling
93
+ interval below half a second. The lock timeout follows the interval, and
94
+ MySQL and Oracle take it as whole seconds, so they rounded it down to not
95
+ waiting at all - only MariaDB honours a fraction. Each such poll gave up
96
+ at once and counted towards `Workhorse.max_global_lock_fails`, so several
97
+ workers contending for the lock could trigger its alarm about a crashed
98
+ worker. The timeout is now rounded up to whole seconds.
99
+
100
+ * A soft restart (`USR1`) no longer wedges a worker whose `tmp/pids` does not
101
+ exist yet, as on a fresh checkout or deployment. The worker touched its
102
+ shutdown file there after it had stopped accepting jobs, so failing on it
103
+ left a worker that took no jobs and never exited. The directory is now
104
+ created when missing, and a shutdown file that still cannot be written no
105
+ longer holds up the shutdown. The heartbeat and the memory-limit shutdown,
106
+ which write to the same directory, create it as well.
107
+
108
+ * `Workhorse.clean_stuck_jobs` works on Oracle. It is built on splitting
109
+ `locked_by` into host, PID and random component, which was written with
110
+ MySQL's `substring_index` and so raised on Oracle for as long as the option
111
+ has existed — visible only to an installation that turned it on, as it is
112
+ off by default.
113
+
132
114
  * A deadlock between shutting a worker down and the poller posting a job.
133
115
  `Worker#shutdown` held the worker's mutex while waiting for the poller
134
116
  thread, which could be waiting for that same mutex in `Worker#perform`. The
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.rc1
1
+ 2.0.0
data/workhorse.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: workhorse 2.0.0.rc1 ruby lib
2
+ # stub: workhorse 2.0.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "workhorse".freeze
6
- s.version = "2.0.0.rc1".freeze
6
+ s.version = "2.0.0".freeze
7
7
 
8
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 = "2026-09-30"
11
+ s.date = "2026-10-14"
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/generators/workhorse/templates/create_table_workhorse_schedules.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_late_schedules_job.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/notifiers/base.rb".freeze, "lib/workhorse/notifiers/file_system.rb".freeze, "lib/workhorse/notifiers/none.rb".freeze, "lib/workhorse/notifiers/redis.rb".freeze, "lib/workhorse/performer.rb".freeze, "lib/workhorse/poller.rb".freeze, "lib/workhorse/pool.rb".freeze, "lib/workhorse/schedule.rb".freeze, "lib/workhorse/schedules.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/notifier_test.rb".freeze, "test/workhorse/performer_test.rb".freeze, "test/workhorse/poller_test.rb".freeze, "test/workhorse/pool_test.rb".freeze, "test/workhorse/schedule_test.rb".freeze, "test/workhorse/worker_test.rb".freeze, "test/workhorse/yjit_test.rb".freeze, "workhorse.gemspec".freeze]
13
13
  s.homepage = "https://github.com/sitrox/workhorse".freeze
14
14
  s.licenses = ["MIT".freeze]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workhorse
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-30 00:00:00.000000000 Z
10
+ date: 2026-10-14 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport