que 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.
data/CHANGELOG.md CHANGED
@@ -1,4 +1,147 @@
1
- ### 1.3.0 (2022-02-25)
1
+ # Changelog
2
+
3
+ <!-- MarkdownTOC autolink=true -->
4
+
5
+ - [2.0.0 \(2022-08-25\)](#200-2022-08-25)
6
+ - [1.4.1 \(2022-07-24\)](#141-2022-07-24)
7
+ - [2.0.0.beta1 \(2022-03-24\)](#200beta1-2022-03-24)
8
+ - [1.4.0 \(2022-03-23\)](#140-2022-03-23)
9
+ - [1.3.1 \(2022-02-25\)](#131-2022-02-25)
10
+ - [1.3.0 \(2022-02-25\)](#130-2022-02-25)
11
+ - [1.2.0 \(2022-02-23\)](#120-2022-02-23)
12
+ - [1.1.0 \(2022-02-21\)](#110-2022-02-21)
13
+ - [1.0.0 \(2022-01-24\)](#100-2022-01-24)
14
+ - [1.0.0.beta5 \(2021-12-23\)](#100beta5-2021-12-23)
15
+ - [1.0.0.beta4 \(2020-01-17\)](#100beta4-2020-01-17)
16
+ - [1.0.0.beta3 \(2018-05-18\)](#100beta3-2018-05-18)
17
+ - [1.0.0.beta2 \(2018-04-13\)](#100beta2-2018-04-13)
18
+ - [1.0.0.beta \(2017-10-25\)](#100beta-2017-10-25)
19
+ - [0.14.3 \(2018-03-02\)](#0143-2018-03-02)
20
+ - [0.14.2 \(2018-01-05\)](#0142-2018-01-05)
21
+ - [0.14.1 \(2017-12-14\)](#0141-2017-12-14)
22
+ - [0.14.0 \(2017-08-11\)](#0140-2017-08-11)
23
+ - [0.13.1 \(2017-07-05\)](#0131-2017-07-05)
24
+ - [0.13.0 \(2017-06-08\)](#0130-2017-06-08)
25
+ - [0.12.3 \(2017-06-01\)](#0123-2017-06-01)
26
+ - [0.12.2 \(2017-06-01\)](#0122-2017-06-01)
27
+ - [0.12.1 \(2017-01-22\)](#0121-2017-01-22)
28
+ - [0.12.0 \(2016-09-09\)](#0120-2016-09-09)
29
+ - [0.11.6 \(2016-07-01\)](#0116-2016-07-01)
30
+ - [0.11.5 \(2016-05-13\)](#0115-2016-05-13)
31
+ - [0.11.4 \(2016-03-03\)](#0114-2016-03-03)
32
+ - [0.11.3 \(2016-02-26\)](#0113-2016-02-26)
33
+ - [0.11.2 \(2015-09-09\)](#0112-2015-09-09)
34
+ - [0.11.1 \(2015-09-04\)](#0111-2015-09-04)
35
+ - [0.11.0 \(2015-09-04\)](#0110-2015-09-04)
36
+ - [0.10.0 \(2015-03-18\)](#0100-2015-03-18)
37
+ - [0.9.2 \(2015-02-05\)](#092-2015-02-05)
38
+ - [0.9.1 \(2015-01-11\)](#091-2015-01-11)
39
+ - [0.9.0 \(2014-12-16\)](#090-2014-12-16)
40
+ - [0.8.2 \(2014-10-12\)](#082-2014-10-12)
41
+ - [0.8.1 \(2014-07-28\)](#081-2014-07-28)
42
+ - [0.8.0 \(2014-07-12\)](#080-2014-07-12)
43
+ - [0.7.3 \(2014-05-19\)](#073-2014-05-19)
44
+ - [0.7.2 \(2014-05-18\)](#072-2014-05-18)
45
+ - [0.7.1 \(2014-04-29\)](#071-2014-04-29)
46
+ - [0.7.0 \(2014-04-09\)](#070-2014-04-09)
47
+ - [0.6.0 \(2014-02-04\)](#060-2014-02-04)
48
+ - [0.5.0 \(2014-01-14\)](#050-2014-01-14)
49
+ - [0.4.0 \(2014-01-05\)](#040-2014-01-05)
50
+ - [0.3.0 \(2013-12-21\)](#030-2013-12-21)
51
+ - [0.2.0 \(2013-11-30\)](#020-2013-11-30)
52
+ - [0.1.0 \(2013-11-18\)](#010-2013-11-18)
53
+ - [0.0.1 \(2013-11-07\)](#001-2013-11-07)
54
+
55
+ <!-- /MarkdownTOC -->
56
+
57
+ ## 2.0.0 (2022-08-25)
58
+
59
+ See beta 2.0.0.beta1, plus:
60
+
61
+ - **Fixed**:
62
+ + Updated to use non-deprecated method from PG when params are passed (`#async_exec_params`). [#374](https://github.com/que-rb/que/pull/374)
63
+
64
+ Note that @dtcristo submitted a PR proposing an easier upgrade path to Que 2 and Ruby 3 - [#365](https://github.com/que-rb/que/pull/365). We are yet to properly consider this, but a later release which includes this feature would mean you don't need to simultaneously deploy Que 1.x and 2.x workers during the upgrade.
65
+
66
+ ## 1.4.1 (2022-07-24)
67
+
68
+ - **Added**
69
+ + Added Ruby version requirement of < 3. For Ruby 3 compatibility, upgrade to Que 2 - [upgrade process](https://github.com/que-rb/que/blob/master/CHANGELOG.md#200beta1-2022-03-24)
70
+
71
+ ## 2.0.0.beta1 (2022-03-24)
72
+
73
+ **Preliminary release of Ruby 3 support**
74
+
75
+ **Notable changes**:
76
+
77
+ * Support for Ruby 3 introduced
78
+ * Database schema has changed to split the job arguments `args` column into `args` and `kwargs` columns, for reliable args and kwargs splitting for Ruby 3.
79
+ - The job schema version is now 2. Note that job schema version is distinct from database schema version and Que version. The `job_schema_version` column of the `que_jobs` table no longer defaults and has a not null constraint, so when manually inserting jobs into the table, this must be specified as `2`. If you have a gem that needs to support multiple Que versions, best not to blindly use the value of `Que.job_schema_version`; instead have different code paths depending on the value of `Que.job_schema_version`. You could also use this to know whether keyword arguments are in `args` or `kwargs`.
80
+ * Passing a hash literal as the last job argument to be splatted into job keyword arguments is no longer supported.
81
+ * Dropped support for providing job options as top-level keyword arguments to `Job.enqueue`, i.e. `queue`, `priority`, `run_at`, `job_class`, and `tags`. Job options now need to be nested under the `job_options` keyword argument instead. See [#336](https://github.com/que-rb/que/pull/336)
82
+ * Dropped support for Ruby < 2.7
83
+ * Dropped support for Rails < 6.0
84
+ * The `#by_args` method on the Job model (for both Sequel and ActiveRecord) now searches based on both args and kwargs, but it performs a subset match instead of an exact match. For instance, if your job was scheduled with `'a', 'b', 'c', foo: 'bar', baz: 1`, `by_args('a', 'b', baz: 1)` would find and return the job.
85
+ * This release contains a database migration. You will need to migrate Que to the latest database schema version (6). For example, on ActiveRecord and Rails 6:
86
+
87
+ ```ruby
88
+ class UpdateQueTablesToVersion6 < ActiveRecord::Migration[6.0]
89
+ def up
90
+ Que.migrate!(version: 6)
91
+ end
92
+
93
+ def down
94
+ Que.migrate!(version: 5)
95
+ end
96
+ end
97
+ ```
98
+
99
+ **Recommended upgrade process**:
100
+
101
+ When using Que 2.x, a job enqueued with Ruby 2.7 will run as expected on Ruby 3. We recommend:
102
+
103
+ 1. Upgrade your project to the latest 1.x version of Que (1.3.1+)
104
+ - IMPORTANT: adds support for zero downtime upgrade to Que 2.x, see changelog below
105
+ 2. Upgrade your project to Ruby 2.7 and Rails 6.x if it is not already
106
+ 3. Upgrade your project to Que 2.x but stay on Ruby 2.7
107
+ - IMPORTANT: You will need to continue to run Que 1.x workers until all jobs enqueued using Que 1.x (i.e. with a `job_schema_version` of `1`) have been finished. See below
108
+ 4. Upgrade your project to Ruby 3
109
+
110
+ *NOTES:*
111
+
112
+ * If you were already running Ruby 2.7 and were not passing a hash literal as the last job argument, you *may* be able to upgrade a running system without draining the queue, though this is not recommended.
113
+ * For all other cases, you will need to follow the recommended process above or first completely drain the queue (stop enqueuing new jobs and finish processing any jobs in the database, including cleaning out any expired jobs) before upgrading.
114
+
115
+ **Deploying Que 1.x and 2.x workers simultaneously**:
116
+
117
+ To run workers with two different versions of Que, you'll probably need to temporarily duplicate your gem bundle, with the Que version being the only difference. e.g.:
118
+
119
+ - Copy your `Gemfile` and `Gemfile.lock` into a directory called `que-1-gemfile`
120
+ - Set a suitable Que version in each `Gemfile`
121
+ - Update the bundle at `que-1-gemfile/Gemfile.lock` using `BUNDLE_GEMFILE=que-1-gemfile/Gemfile bundle`
122
+ - Create a second deployment of Que, but with your `que` command prefixed with `BUNDLE_GEMFILE=que-1-gemfile/Gemfile`
123
+
124
+ We'd appreciate feedback on your experience upgrading to and running Que 2. Feel free to post on our Discord, or if you run into trouble, open an issue on GitHub.
125
+
126
+ ## 1.4.0 (2022-03-23)
127
+
128
+ - **Fixed**
129
+ + The poller will no longer sleep when jobs exist for only some of its priorities. It now skips sleeping when a poll returns more jobs than the lowest priority requested. [#349](https://github.com/que-rb/que/pull/349).
130
+ * An alternative was considered which skipped polling when only some of the waiting worker priorities would be fully utilised ([diagram explanation](https://github.com/que-rb/que/pull/348#discussion_r819213357)); but this was decided against for code complexity reasons. [#348](https://github.com/que-rb/que/pull/348)
131
+ - **Deprecated**:
132
+ + Deprecated `--minimum-buffer-size` option. It was not actually used, and will be removed in v2.0.0. [#346](https://github.com/que-rb/que/pull/346)
133
+ * It became used in 1.0.0.beta4, and that changelog entry has been updated to reflect this.
134
+ - **Documentation**:
135
+ + Reformatted the changelog to be more consistent, including adding links to all issue/PR numbers. [#347](https://github.com/que-rb/que/pull/347)
136
+
137
+ ## 1.3.1 (2022-02-25)
138
+
139
+ Unfortunately, v1.3.0 was broken. Follow its upgrade instructions, but use this version instead.
140
+
141
+ - **Fixed**
142
+ + Fixed startup error: `undefined method 'job_schema_version' for Que:Module`, in [#343](https://github.com/que-rb/que/pull/343)
143
+
144
+ ## 1.3.0 (2022-02-25)
2
145
 
3
146
  **ACTION REQUIRED**
4
147
 
@@ -29,625 +172,388 @@ You must apply the schema migration and deploy to upgrade all workers.
29
172
 
30
173
  No further action is required from you at this stage. The Que 2 release changelog will provide full upgrade instructions for the process briefly described above of simultaneously running both Que 1 & 2 workers. Note that you won't be required to upgrade from Ruby 2.7 to Ruby 3 at the same time as upgrading to Que 2.
31
174
 
32
- If you use any Que plugins or custom code that interacts with the `que_jobs` table, before you can upgrade to Que 2, you will need to make sure they are updated for compatibility with Que 2: They'll need to make use of the `kwargs` column, and when inserting jobs, put the result of `Que.job_schema_version` into the `job_schema_version` column rather than continue to rely on its default of `1`.
175
+ If you use any Que plugins or custom code that interacts with the `que_jobs` table, before you can upgrade to Que 2, you will need to make sure they are updated for compatibility with Que 2: They'll need to make use of the `kwargs` column, and when inserting jobs, put a `2` into the `job_schema_version` column rather than continue to rely on its soon-to-be-removed default of `1`.
176
+
177
+ **Other improvements**:
178
+
179
+ - **Features**:
180
+ + Log config on startup, in [#337](https://github.com/que-rb/que/pull/337)
181
+ - **Internal**:
182
+ + Added Git pre-push hook, in [#338](https://github.com/que-rb/que/pull/338)
183
+ + Documented our gem release process, in [#341](https://github.com/que-rb/que/pull/341)
33
184
 
34
- ### 1.2.0 (2022-02-23)
185
+ ## 1.2.0 (2022-02-23)
35
186
 
36
187
  - **Deprecated**
37
188
  + Providing job options as top level keyword arguments to Job.enqueue is now deprecated. Support will be dropped in `2.0`. Job options should be nested under the `job_options` keyword arg instead. See [#336](https://github.com/que-rb/que/pull/336)
38
189
 
39
- ### 1.1.0 (2022-02-21)
190
+ ## 1.1.0 (2022-02-21)
40
191
 
41
192
  - **Features**:
42
193
  + Add backtrace to errors, by [@trammel](https://github.com/trammel) in [#328](https://github.com/que-rb/que/pull/328)
43
194
  - **Internal**:
44
195
  + Add Dockerised development environment, in [#324](https://github.com/que-rb/que/pull/324)
45
196
 
46
- ### 1.0.0 (2022-01-24)
197
+ ## 1.0.0 (2022-01-24)
47
198
 
48
199
  _This release does not add any changes on top of 1.0.0.beta5._
49
200
 
50
- ### 1.0.0.beta5 (2021-12-23)
51
-
52
- * **Bug fixes and improvements**
53
- * Add more context to error message when config files fail to load. by [@trammel](https://github.com/trammel) in [#293](https://github.com/que-rb/que/pull/293)
54
- * Fix lock leak on PostgreSQL 12 and later by [@jasoncodes](https://github.com/jasoncodes) in [#298](https://github.com/que-rb/que/pull/298)
55
- * Fix deadlock issue [#318](https://github.com/que-rb/que/pull/318)
56
- * Fix thread attrition issue [#321](https://github.com/que-rb/que/pull/321)
57
-
58
- * **Rails fixes:**
59
- * Set schema in table_name for ActiveRecord model by [@nikitug](https://github.com/nikitug) in [#274](https://github.com/que-rb/que/pull/274)
60
-
61
- * **Documentation:**
62
- * Add link to que-locks for exclusive job locking by [@airhorns](https://github.com/airhorns) in [#263](https://github.com/que-rb/que/pull/263)
201
+ ## 1.0.0.beta5 (2021-12-23)
202
+
203
+ - **Bug fixes and improvements**
204
+ + Add more context to error message when config files fail to load. by [@trammel](https://github.com/trammel) in [#293](https://github.com/que-rb/que/pull/293)
205
+ + Fix lock leak on PostgreSQL 12 and later by [@jasoncodes](https://github.com/jasoncodes) in [#298](https://github.com/que-rb/que/pull/298)
206
+ + Fix deadlock issue [#318](https://github.com/que-rb/que/pull/318)
207
+ + Fix thread attrition issue [#321](https://github.com/que-rb/que/pull/321)
208
+ - **Rails fixes:**
209
+ + Set schema in table_name for ActiveRecord model by [@nikitug](https://github.com/nikitug) in [#274](https://github.com/que-rb/que/pull/274)
210
+ - **Documentation:**
211
+ + Add link to que-locks for exclusive job locking by [@airhorns](https://github.com/airhorns) in [#263](https://github.com/que-rb/que/pull/263)
63
212
  [`5259303`](https://github.com/que-rb/que/commit/52593031a7eef2d52ac38eceb2d8df776ec74090)
64
- * Fix links to Writing Reliable Jobs by [@nikitug](https://github.com/nikitug) in [#273](https://github.com/que-rb/que/pull/273)
65
- * Add build badge to README by [@jonathanhefner](https://github.com/jonathanhefner) in [#278](https://github.com/que-rb/que/pull/278)
66
- * Fix ToC links in docs by [@swrobel](https://github.com/swrobel) in [#287](https://github.com/que-rb/que/pull/287)
67
- * Note all Rails queue names that must be changed by [@swrobel](https://github.com/swrobel) in [#296](https://github.com/que-rb/que/pull/296)
68
- * Add instructions for how to start Que by [@xcskier56](https://github.com/xcskier56) in [#292](https://github.com/que-rb/que/pull/292)
69
-
70
- * **CI/tests**
71
- * Fix CI failure from Docker Postgres image by [@jonathanhefner](https://github.com/jonathanhefner) in [#275](https://github.com/que-rb/que/pull/275)
72
- * Test with Ruby 2.7 by [@jonathanhefner](https://github.com/jonathanhefner) in [#276](https://github.com/que-rb/que/pull/276)
73
- * Run GitHub build workflow on push by [@jonathanhefner](https://github.com/jonathanhefner) in [#277](https://github.com/que-rb/que/pull/277)
74
-
75
-
213
+ + Fix links to Writing Reliable Jobs by [@nikitug](https://github.com/nikitug) in [#273](https://github.com/que-rb/que/pull/273)
214
+ + Add build badge to README by [@jonathanhefner](https://github.com/jonathanhefner) in [#278](https://github.com/que-rb/que/pull/278)
215
+ + Fix ToC links in docs by [@swrobel](https://github.com/swrobel) in [#287](https://github.com/que-rb/que/pull/287)
216
+ + Note all Rails queue names that must be changed by [@swrobel](https://github.com/swrobel) in [#296](https://github.com/que-rb/que/pull/296)
217
+ + Add instructions for how to start Que by [@xcskier56](https://github.com/xcskier56) in [#292](https://github.com/que-rb/que/pull/292)
218
+ - **CI/tests**
219
+ + Fix CI failure from Docker Postgres image by [@jonathanhefner](https://github.com/jonathanhefner) in [#275](https://github.com/que-rb/que/pull/275)
220
+ + Test with Ruby 2.7 by [@jonathanhefner](https://github.com/jonathanhefner) in [#276](https://github.com/que-rb/que/pull/276)
221
+ + Run GitHub build workflow on push by [@jonathanhefner](https://github.com/jonathanhefner) in [#277](https://github.com/que-rb/que/pull/277)
76
222
  **Full Changelog**: [`v1.0.0.beta4...v1.0.0.beta5`](https://github.com/que-rb/que/compare/v1.0.0.beta4...v1.0.0.beta5)
77
-
78
223
  **Unless an issue is found we intend for this release to become v1.0.0 proper.**
79
224
 
80
- ---
81
-
82
- ### 1.0.0.beta4 (2020-01-17)
83
-
84
- - Rails 6 compatibility: Fix time parsing #249 and https://github.com/que-rb/que/commit/5ddddd5ebac6153d7a683ef08c86bced8e03fb51
85
- - Cleaner sequel usage #257
86
- - Documentation improvements #264 #269 #261 #231
87
-
88
- ---
89
-
90
- ### 1.0.0.beta3 (2018-05-18)
91
-
92
- * Added support for customizing log levels for `job_worked` events (#217).
93
-
94
- * Began logging all `job_errored` events at the `ERROR` log level.
95
-
96
- * Fixed the Railtie when running in test mode (#214).
97
-
98
- * Tweaked the meanings of worker-priorities and worker-count options in the CLI, to better support use cases with low worker counts (#216).
99
-
100
- ---
101
-
102
- ### 1.0.0.beta2 (2018-04-13)
103
-
104
- * **A schema upgrade to version 4 will be required for this release.** See [the migration doc](https://github.com/que-rb/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.
105
-
106
- * Please note that this migration requires a rewrite of the jobs table, which makes it O(n) with the size of the table. If you have a very large backlog of jobs you may want to schedule downtime for this migration.
107
-
108
- * Que's implementation has been changed from one in which worker threads hold their own PG connections and lock their own jobs to one in which a single thread (and PG connection) locks jobs through LISTEN/NOTIFY and batch polling, and passes jobs along to worker threads. This has many benefits, including:
109
-
110
- * Jobs queued for immediate processing can be actively distributed to workers with LISTEN/NOTIFY, which is more efficient than having workers repeatedly poll for new jobs.
111
-
112
- * When polling is necessary (to pick up jobs that are scheduled for the future or that need to be retried due to errors), jobs can be locked and fetched in batches, rather than one at a time.
113
-
114
- * Individual workers no longer need to monopolize their own (usually idle) connections while working jobs, so Ruby processes will require fewer Postgres connections.
115
-
116
- * PgBouncer or another external connection pool can be used for workers' connections (though not for the connection used to lock and listen for jobs).
117
-
118
- * Other features introduced in this version include:
119
-
120
- * Much better support for all versions of ActiveJob.
121
-
122
- * In particular, you may (optionally) include `Que::ActiveJob::JobExtensions` into `ApplicationJob` to get support for all of Que's job helper methods.
123
-
124
- * Custom middleware that wrap running jobs and executing SQL statements are now supported.
125
-
126
- * Support for categorizing jobs with tags.
127
-
128
- * Support for configuring a `maximum_retry_count` on individual job classes.
129
-
130
- * Job configuration options are now inheritable, so job class hierarchies are more useful.
131
-
132
- * There are now built-in models for ActiveRecord and Sequel to allow inspecting the queue easily.
133
-
134
- * Jobs that have finished working may optionally be retained in the database indefinitely.
135
-
136
- * To keep a job record, replace the `destroy` calls in your jobs with `finish`. `destroy` will still delete records entirely, for jobs that you don't want to keep.
137
-
138
- * If you don't resolve a job yourself one way or another, Que will still `destroy` the job for you by default.
139
-
140
- * Finished jobs have a timestamp set in the finished_at column.
141
-
142
- * Jobs that have errored too many times will now be marked as expired, and won't be retried again.
143
-
144
- * You can configure a maximum_retry_count in your job classes, to set the threshold at which a job will be marked expired. The default is 15.
145
-
146
- * To manually mark a job as expired (and keep it in the database but not try to run it again) you can call `expire` helper in your job.
147
-
148
- * You can now set job priority thresholds for individual workers, to ensure that there will always be space available for high-priority jobs.
149
-
150
- * `Que.job_states` returns a list of locked jobs and the hostname/pid of the Ruby processes that have locked them.
151
-
152
- * `Que.connection_proc=` has been added, to allow for the easy integration of custom connection pools.
153
-
154
- * In keeping with semantic versioning, the major version is being bumped since the new implementation requires some backwards-incompatible changes. These changes include:
155
-
156
- * Support for MRI Rubies before 2.2 has been dropped.
157
-
158
- * Support for Postgres versions before 9.5 has been dropped (JSONB and upsert support is required).
159
-
160
- * JRuby support has been dropped. It will be reintroduced whenever the jruby-pg gem is production-ready.
161
-
162
- * The `que:work` rake task has been removed. Use the `que` executable instead.
163
-
164
- * Therefore, configuring workers using QUE_* environment variables is no longer supported. Please pass the appropriate options to the `que` executable instead.
165
-
166
- * The `mode` setter has been removed.
167
-
168
- * To run jobs synchronously when they are enqueued (the old `:sync` behavior) you can set `Que.run_synchronously = true`.
169
-
170
- * To start up the worker pool (the old :async behavior) you should use the `que` executable to start up a worker process. There's no longer a supported API for running workers outside of the `que` executable.
171
-
172
- * The following methods are not meaningful under the new implementation and have been removed:
173
-
174
- * The `Que.wake_interval` getter and setter.
175
-
176
- * The `Que.worker_count` getter and setter.
177
-
178
- * `Que.wake!`
179
-
180
- * `Que.wake_all!`
181
-
182
- * Since Que needs a dedicated Postgres connection to manage job locks, running Que through a single PG connection is no longer supported.
183
-
184
- * It's not clear that anyone ever actually did this.
185
-
186
- * `Que.worker_states` has been removed, as the connection that locks a job is no longer the one that the job is using to run. Its functionality has been partially replaced with `Que.job_states`.
187
-
188
- * When using Rails, for simplicity, job attributes and keys in argument hashes are now converted to symbols when retrieved from the database, rather than being converted to instances of HashWithIndifferentAccess.
189
-
190
- * Arguments passed to jobs are now deep-frozen, to prevent unexpected behavior when the args are mutated and the job is reenqueued.
191
-
192
- * Since JSONB is now used to store arguments, the order of argument hashes is no longer maintained.
193
-
194
- * It wouldn't have been a good idea to rely on this anyway.
195
-
196
- * Calling Que.log() directly is no longer supported/recommended.
197
-
198
- * Features marked as deprecated in the final 0.x releases have been removed.
199
-
200
- * Finally, if you've built up your own tooling and customizations around Que, you may need to be aware of some DB schema changes made in the migration to schema version #4.
201
-
202
- * The `job_id` column has been renamed `id` and is now the primary key. This makes it easier to manage the queue using an ActiveRecord model.
203
-
204
- * Finished jobs are now kept in the DB, unless you explicitly call `destroy`. If you want to query the DB for only jobs that haven't finished yet, add a `WHERE finished_at IS NULL` condition to your query, or use the not_finished scope on one of the provided ORM models.
205
-
206
- * There is now an `expired_at` timestamp column, which is set when a job reaches its maximum number of retries and will not be attempted again.
207
-
208
- * Due to popular demand, the default queue name is now "default" rather than an empty string. The migration will move pending jobs under the "" queue to the "default" queue.
209
-
210
- * The `last_error` column has been split in two, to `last_error_message` and `last_error_backtrace`. These two columns are now limited to 500 and 10,000 characters, respectively. The migration will split old error data correctly, and truncate it if necessary.
211
-
212
- * Names for queues and job classes are now limited to 500 characters, which is still far longer than either of these values should reasonably be.
213
-
214
- * There is now a `data` JSONB column which is used to support various ways of organizing jobs (setting tags on them, etc).
215
- ---
216
-
217
- ### 1.0.0.beta (2017-10-25)
218
-
219
- * **A schema upgrade to version 4 will be required for this release.** See [the migration doc](https://github.com/que-rb/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.
220
-
221
- * Please note that this migration requires a rewrite of the jobs table, which makes it O(n) with the size of the table. If you have a very large backlog of jobs you may want to schedule downtime for this migration.
222
-
223
- * Que's implementation has been changed from one in which worker threads hold their own PG connections and lock their own jobs to one in which a single thread (and PG connection) locks jobs through LISTEN/NOTIFY and batch polling, and passes jobs along to worker threads. This has many benefits, including:
224
-
225
- * Jobs queued for immediate processing can be actively distributed to workers with LISTEN/NOTIFY, which is more efficient than having workers repeatedly poll for new jobs.
226
-
227
- * When polling is necessary (to pick up jobs that are scheduled for the future or that need to be retried due to errors), jobs can be locked and fetched in batches, rather than one at a time.
228
-
229
- * Individual workers no longer need to monopolize their own (usually idle) connections while working jobs, so Ruby processes will require fewer Postgres connections.
230
-
231
- * PgBouncer or another external connection pool can be used for workers' connections (though not for the connection used to lock and listen for jobs).
232
-
233
- * Other features introduced in this version include:
234
-
235
- * Much better support for all versions of ActiveJob.
236
-
237
- * In particular, you may (optionally) include `Que::ActiveJob::JobExtensions` into `ApplicationJob` to get support for all of Que's job helper methods.
238
-
239
- * Custom middleware that wrap running jobs are now supported.
240
-
241
- * Support for categorizing jobs with tags.
242
-
243
- * Support for configuring a `maximum_retry_count` on individual job classes.
244
-
245
- * Job configuration options are now inheritable, so job class hierarchies are more useful.
246
-
247
- * There are now built-in models for ActiveRecord and Sequel to allow inspecting the queue easily.
248
-
249
- * Jobs that have finished working may optionally be retained in the database indefinitely.
250
-
251
- * To keep a job record, replace the `destroy` calls in your jobs with `finish`. `destroy` will still delete records entirely, for jobs that you don't want to keep.
252
-
253
- * If you don't resolve a job yourself one way or another, Que will still `destroy` the job for you by default.
254
-
255
- * Finished jobs have a timestamp set in the finished_at column.
256
-
257
- * Jobs that have errored too many times will now be marked as expired, and won't be retried again.
258
-
259
- * You can configure a maximum_retry_count in your job classes, to set the threshold at which a job will be marked expired. The default is 15.
260
-
261
- * To manually mark a job as expired (and keep it in the database but not try to run it again) you can call `expire` helper in your job.
225
+ ## 1.0.0.beta4 (2020-01-17)
226
+
227
+ - Rails 6 compatibility: Fix time parsing [#249](https://github.com/que-rb/que/pull/249) and [5ddddd5](https://github.com/que-rb/que/commit/5ddddd5ebac6153d7a683ef08c86bced8e03fb51)
228
+ - Cleaner sequel usage, in [#257](https://github.com/que-rb/que/pull/257)
229
+ - Documentation improvements: [#264](https://github.com/que-rb/que/pull/264), [#269](https://github.com/que-rb/que/pull/269), [#261](https://github.com/que-rb/que/pull/261), [#231](https://github.com/que-rb/que/pull/231)
230
+ - The `--minimum-buffer-size` option is now unused
231
+
232
+ ## 1.0.0.beta3 (2018-05-18)
233
+
234
+ - Added support for customizing log levels for `job_worked` events ([#217](https://github.com/que-rb/que/issues/217)).
235
+ - Began logging all `job_errored` events at the `ERROR` log level.
236
+ - Fixed the Railtie when running in test mode ([#214](https://github.com/que-rb/que/issues/214)).
237
+ - Tweaked the meanings of worker-priorities and worker-count options in the CLI, to better support use cases with low worker counts ([#216](https://github.com/que-rb/que/issues/216)).
238
+
239
+ ## 1.0.0.beta2 (2018-04-13)
240
+
241
+ - **A schema upgrade to version 4 will be required for this release.** See [the migration doc](https://github.com/que-rb/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.
242
+ + Please note that this migration requires a rewrite of the jobs table, which makes it O(n) with the size of the table. If you have a very large backlog of jobs you may want to schedule downtime for this migration.
243
+ - Que's implementation has been changed from one in which worker threads hold their own PG connections and lock their own jobs to one in which a single thread (and PG connection) locks jobs through LISTEN/NOTIFY and batch polling, and passes jobs along to worker threads. This has many benefits, including:
244
+ + Jobs queued for immediate processing can be actively distributed to workers with LISTEN/NOTIFY, which is more efficient than having workers repeatedly poll for new jobs.
245
+ + When polling is necessary (to pick up jobs that are scheduled for the future or that need to be retried due to errors), jobs can be locked and fetched in batches, rather than one at a time.
246
+ + Individual workers no longer need to monopolize their own (usually idle) connections while working jobs, so Ruby processes will require fewer Postgres connections.
247
+ + PgBouncer or another external connection pool can be used for workers' connections (though not for the connection used to lock and listen for jobs).
248
+ - Other features introduced in this version include:
249
+ + Much better support for all versions of ActiveJob.
250
+ * In particular, you may (optionally) include `Que::ActiveJob::JobExtensions` into `ApplicationJob` to get support for all of Que's job helper methods.
251
+ + Custom middleware that wrap running jobs and executing SQL statements are now supported.
252
+ + Support for categorizing jobs with tags.
253
+ + Support for configuring a `maximum_retry_count` on individual job classes.
254
+ + Job configuration options are now inheritable, so job class hierarchies are more useful.
255
+ + There are now built-in models for ActiveRecord and Sequel to allow inspecting the queue easily.
256
+ + Jobs that have finished working may optionally be retained in the database indefinitely.
257
+ * To keep a job record, replace the `destroy` calls in your jobs with `finish`. `destroy` will still delete records entirely, for jobs that you don't want to keep.
258
+ * If you don't resolve a job yourself one way or another, Que will still `destroy` the job for you by default.
259
+ * Finished jobs have a timestamp set in the finished_at column.
260
+ + Jobs that have errored too many times will now be marked as expired, and won't be retried again.
261
+ * You can configure a maximum_retry_count in your job classes, to set the threshold at which a job will be marked expired. The default is 15.
262
+ * To manually mark a job as expired (and keep it in the database but not try to run it again) you can call `expire` helper in your job.
263
+ + You can now set job priority thresholds for individual workers, to ensure that there will always be space available for high-priority jobs.
264
+ + `Que.job_states` returns a list of locked jobs and the hostname/pid of the Ruby processes that have locked them.
265
+ + `Que.connection_proc=` has been added, to allow for the easy integration of custom connection pools.
266
+ - In keeping with semantic versioning, the major version is being bumped since the new implementation requires some backwards-incompatible changes. These changes include:
267
+ + Support for MRI Rubies before 2.2 has been dropped.
268
+ + Support for Postgres versions before 9.5 has been dropped (JSONB and upsert support is required).
269
+ + JRuby support has been dropped. It will be reintroduced whenever the jruby-pg gem is production-ready.
270
+ + The `que:work` rake task has been removed. Use the `que` executable instead.
271
+ * Therefore, configuring workers using QUE_* environment variables is no longer supported. Please pass the appropriate options to the `que` executable instead.
272
+ + The `mode` setter has been removed.
273
+ * To run jobs synchronously when they are enqueued (the old `:sync` behavior) you can set `Que.run_synchronously = true`.
274
+ * To start up the worker pool (the old :async behavior) you should use the `que` executable to start up a worker process. There's no longer a supported API for running workers outside of the `que` executable.
275
+ + The following methods are not meaningful under the new implementation and have been removed:
276
+ * The `Que.wake_interval` getter and setter.
277
+ * The `Que.worker_count` getter and setter.
278
+ * `Que.wake!`
279
+ * `Que.wake_all!`
280
+ + Since Que needs a dedicated Postgres connection to manage job locks, running Que through a single PG connection is no longer supported.
281
+ * It's not clear that anyone ever actually did this.
282
+ + `Que.worker_states` has been removed, as the connection that locks a job is no longer the one that the job is using to run. Its functionality has been partially replaced with `Que.job_states`.
283
+ + When using Rails, for simplicity, job attributes and keys in argument hashes are now converted to symbols when retrieved from the database, rather than being converted to instances of HashWithIndifferentAccess.
284
+ + Arguments passed to jobs are now deep-frozen, to prevent unexpected behavior when the args are mutated and the job is reenqueued.
285
+ + Since JSONB is now used to store arguments, the order of argument hashes is no longer maintained.
286
+ * It wouldn't have been a good idea to rely on this anyway.
287
+ + Calling Que.log() directly is no longer supported/recommended.
288
+ + Features marked as deprecated in the final 0.x releases have been removed.
289
+ - Finally, if you've built up your own tooling and customizations around Que, you may need to be aware of some DB schema changes made in the migration to schema version #4.
290
+ + The `job_id` column has been renamed `id` and is now the primary key. This makes it easier to manage the queue using an ActiveRecord model.
291
+ + Finished jobs are now kept in the DB, unless you explicitly call `destroy`. If you want to query the DB for only jobs that haven't finished yet, add a `WHERE finished_at IS NULL` condition to your query, or use the not_finished scope on one of the provided ORM models.
292
+ + There is now an `expired_at` timestamp column, which is set when a job reaches its maximum number of retries and will not be attempted again.
293
+ + Due to popular demand, the default queue name is now "default" rather than an empty string. The migration will move pending jobs under the "" queue to the "default" queue.
294
+ + The `last_error` column has been split in two, to `last_error_message` and `last_error_backtrace`. These two columns are now limited to 500 and 10,000 characters, respectively. The migration will split old error data correctly, and truncate it if necessary.
295
+ + Names for queues and job classes are now limited to 500 characters, which is still far longer than either of these values should reasonably be.
296
+ + There is now a `data` JSONB column which is used to support various ways of organizing jobs (setting tags on them, etc).
297
+
298
+ ## 1.0.0.beta (2017-10-25)
299
+
300
+ - **A schema upgrade to version 4 will be required for this release.** See [the migration doc](https://github.com/que-rb/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.
301
+ + Please note that this migration requires a rewrite of the jobs table, which makes it O(n) with the size of the table. If you have a very large backlog of jobs you may want to schedule downtime for this migration.
302
+ - Que's implementation has been changed from one in which worker threads hold their own PG connections and lock their own jobs to one in which a single thread (and PG connection) locks jobs through LISTEN/NOTIFY and batch polling, and passes jobs along to worker threads. This has many benefits, including:
303
+ + Jobs queued for immediate processing can be actively distributed to workers with LISTEN/NOTIFY, which is more efficient than having workers repeatedly poll for new jobs.
304
+ + When polling is necessary (to pick up jobs that are scheduled for the future or that need to be retried due to errors), jobs can be locked and fetched in batches, rather than one at a time.
305
+ + Individual workers no longer need to monopolize their own (usually idle) connections while working jobs, so Ruby processes will require fewer Postgres connections.
306
+ + PgBouncer or another external connection pool can be used for workers' connections (though not for the connection used to lock and listen for jobs).
307
+ - Other features introduced in this version include:
308
+ + Much better support for all versions of ActiveJob.
309
+ * In particular, you may (optionally) include `Que::ActiveJob::JobExtensions` into `ApplicationJob` to get support for all of Que's job helper methods.
310
+ + Custom middleware that wrap running jobs are now supported.
311
+ + Support for categorizing jobs with tags.
312
+ + Support for configuring a `maximum_retry_count` on individual job classes.
313
+ + Job configuration options are now inheritable, so job class hierarchies are more useful.
314
+ + There are now built-in models for ActiveRecord and Sequel to allow inspecting the queue easily.
315
+ + Jobs that have finished working may optionally be retained in the database indefinitely.
316
+ * To keep a job record, replace the `destroy` calls in your jobs with `finish`. `destroy` will still delete records entirely, for jobs that you don't want to keep.
317
+ * If you don't resolve a job yourself one way or another, Que will still `destroy` the job for you by default.
318
+ * Finished jobs have a timestamp set in the finished_at column.
319
+ + Jobs that have errored too many times will now be marked as expired, and won't be retried again.
320
+ * You can configure a maximum_retry_count in your job classes, to set the threshold at which a job will be marked expired. The default is 15.
321
+ * To manually mark a job as expired (and keep it in the database but not try to run it again) you can call `expire` helper in your job.
322
+ + You can now set job priority thresholds for individual workers, to ensure that there will always be space available for high-priority jobs.
323
+ + `Que.job_states` returns a list of locked jobs and the hostname/pid of the Ruby processes that have locked them.
324
+ + `Que.connection_proc=` has been added, to allow for the easy integration of custom connection pools.
325
+ - In keeping with semantic versioning, the major version is being bumped since the new implementation requires some backwards-incompatible changes. These changes include:
326
+ + Support for MRI Rubies before 2.2 has been dropped.
327
+ + Support for Postgres versions before 9.5 has been dropped (JSONB and upsert support is required).
328
+ + JRuby support has been dropped. It will be reintroduced whenever the jruby-pg gem is production-ready.
329
+ + The `que:work` rake task has been removed. Use the `que` executable instead.
330
+ * Therefore, configuring workers using QUE_* environment variables is no longer supported. Please pass the appropriate options to the `que` executable instead.
331
+ + The `mode` setter has been removed.
332
+ * To run jobs synchronously when they are enqueued (the old `:sync` behavior) you can set `Que.run_synchronously = true`.
333
+ * To start up the worker pool (the old :async behavior) you should use the `que` executable to start up a worker process. There's no longer a supported API for running workers outside of the `que` executable.
334
+ + The following methods are not meaningful under the new implementation and have been removed:
335
+ * The `Que.wake_interval` getter and setter.
336
+ * The `Que.worker_count` getter and setter.
337
+ * `Que.wake!`
338
+ * `Que.wake_all!`
339
+ + Since Que needs a dedicated Postgres connection to manage job locks, running Que through a single PG connection is no longer supported.
340
+ * It's not clear that anyone ever actually did this.
341
+ + `Que.worker_states` has been removed, as the connection that locks a job is no longer the one that the job is using to run. Its functionality has been partially replaced with `Que.job_states`.
342
+ + When using Rails, for simplicity, job attributes and keys in argument hashes are now converted to symbols when retrieved from the database, rather than being converted to instances of HashWithIndifferentAccess.
343
+ + Arguments passed to jobs are now deep-frozen, to prevent unexpected behavior when the args are mutated and the job is reenqueued.
344
+ + Since JSONB is now used to store arguments, the order of argument hashes is no longer maintained.
345
+ * It wouldn't have been a good idea to rely on this anyway.
346
+ + Calling Que.log() directly is no longer supported/recommended.
347
+ + Features marked as deprecated in the final 0.x releases have been removed.
348
+ - Finally, if you've built up your own tooling and customizations around Que, you may need to be aware of some DB schema changes made in the migration to schema version #4.
349
+ + The `job_id` column has been renamed `id` and is now the primary key. This makes it easier to manage the queue using an ActiveRecord model.
350
+ + Finished jobs are now kept in the DB, unless you explicitly call `destroy`. If you want to query the DB for only jobs that haven't finished yet, add a `WHERE finished_at IS NULL` condition to your query, or use the not_finished scope on one of the provided ORM models.
351
+ + There is now an `expired_at` timestamp column, which is set when a job reaches its maximum number of retries and will not be attempted again.
352
+ + Due to popular demand, the default queue name is now "default" rather than an empty string. The migration will move pending jobs under the "" queue to the "default" queue.
353
+ + The `last_error` column has been split in two, to `last_error_message` and `last_error_backtrace`. These two columns are now limited to 500 and 10,000 characters, respectively. The migration will split old error data correctly, and truncate it if necessary.
354
+ + Names for queues and job classes are now limited to 500 characters, which is still far longer than either of these values should reasonably be.
355
+ + There is now a `data` JSONB column which is used to support various ways of organizing jobs (setting tags on them, etc).
356
+
357
+ ## 0.14.3 (2018-03-02)
358
+
359
+ - Recorded errors now always include the error class, so that empty error messages can still be helpful. ( joehorsnell)
360
+ - Recorded error messages are now truncated to the first 500 characters.
361
+
362
+ ## 0.14.2 (2018-01-05)
363
+
364
+ - Deprecate the Que.disable_prepared_statements= accessors.
365
+ - Add Que.use_prepared_statements= configuration accessors.
366
+ - Update the generated Rails migration to declare a version. (NARKOZ)
262
367
 
263
- * You can now set job priority thresholds for individual workers, to ensure that there will always be space available for high-priority jobs.
368
+ ## 0.14.1 (2017-12-14)
264
369
 
265
- * `Que.job_states` returns a list of locked jobs and the hostname/pid of the Ruby processes that have locked them.
370
+ - Fix a bug with typecasting boolean values on Rails 5+.
266
371
 
267
- * `Que.connection_proc=` has been added, to allow for the easy integration of custom connection pools.
372
+ ## 0.14.0 (2017-08-11)
268
373
 
269
- * In keeping with semantic versioning, the major version is being bumped since the new implementation requires some backwards-incompatible changes. These changes include:
374
+ - Fix incompatibility with Rails 5.1.
375
+ - Drop support for waking an in-process worker when an ActiveRecord transaction commits.
270
376
 
271
- * Support for MRI Rubies before 2.2 has been dropped.
377
+ ## 0.13.1 (2017-07-05)
272
378
 
273
- * Support for Postgres versions before 9.5 has been dropped (JSONB and upsert support is required).
379
+ - Fix issue that caused error stacktraces to not be persisted in most cases.
274
380
 
275
- * JRuby support has been dropped. It will be reintroduced whenever the jruby-pg gem is production-ready.
381
+ ## 0.13.0 (2017-06-08)
276
382
 
277
- * The `que:work` rake task has been removed. Use the `que` executable instead.
383
+ - Fix recurring JSON issues by dropping MultiJson support. Previously MultiJson was detected and used automatically, and now it's just ignored and stdlib JSON used instead, so this shouldn't require any code changes.
278
384
 
279
- * Therefore, configuring workers using QUE_* environment variables is no longer supported. Please pass the appropriate options to the `que` executable instead.
385
+ ## 0.12.3 (2017-06-01)
280
386
 
281
- * The `mode` setter has been removed.
387
+ - Fix incompatibility with MultiJson introduced by the previous release.
282
388
 
283
- * To run jobs synchronously when they are enqueued (the old `:sync` behavior) you can set `Que.run_synchronously = true`.
389
+ ## 0.12.2 (2017-06-01)
284
390
 
285
- * To start up the worker pool (the old :async behavior) you should use the `que` executable to start up a worker process. There's no longer a supported API for running workers outside of the `que` executable.
391
+ - Fix security vulnerability in parsing JSON from the DB (by specifying create_additions: false). This shouldn't be a concern unless you were passing untrusted user input in your job arguments. (hmac)
286
392
 
287
- * The following methods are not meaningful under the new implementation and have been removed:
393
+ ## 0.12.1 (2017-01-22)
288
394
 
289
- * The `Que.wake_interval` getter and setter.
395
+ - Fix incompatibility with Rails 5.0. ([#166](https://github.com/que-rb/que/issues/166)) (nbibler, thedarkone)
290
396
 
291
- * The `Que.worker_count` getter and setter.
397
+ ## 0.12.0 (2016-09-09)
292
398
 
293
- * `Que.wake!`
399
+ - The error_handler configuration option has been renamed to error_notifier, which is more descriptive of what it's actually supposed to do. You can still use error_handler for configuration, but you'll get a warning.
400
+ - Introduced a new framework for handling errors on a per-job basis. See the docs for more information. ([#106](https://github.com/que-rb/que/pull/106), [#147](https://github.com/que-rb/que/issues/147))
294
401
 
295
- * `Que.wake_all!`
402
+ ## 0.11.6 (2016-07-01)
296
403
 
297
- * Since Que needs a dedicated Postgres connection to manage job locks, running Que through a single PG connection is no longer supported.
404
+ - Fix for operating in nested transactions in Rails 5.0. ([#160](https://github.com/que-rb/que/pull/160)) (greysteil)
298
405
 
299
- * It's not clear that anyone ever actually did this.
406
+ ## 0.11.5 (2016-05-13)
300
407
 
301
- * `Que.worker_states` has been removed, as the connection that locks a job is no longer the one that the job is using to run. Its functionality has been partially replaced with `Que.job_states`.
408
+ - Fix error when running `que -v`. ([#154](https://github.com/que-rb/que/pull/154)) (hardbap)
302
409
 
303
- * When using Rails, for simplicity, job attributes and keys in argument hashes are now converted to symbols when retrieved from the database, rather than being converted to instances of HashWithIndifferentAccess.
410
+ ## 0.11.4 (2016-03-03)
304
411
 
305
- * Arguments passed to jobs are now deep-frozen, to prevent unexpected behavior when the args are mutated and the job is reenqueued.
412
+ - Fix incompatibility with ActiveRecord 5.0.0.beta3. ([#143](https://github.com/que-rb/que/issues/143), [#144](https://github.com/que-rb/que/pull/144)) (joevandyk)
306
413
 
307
- * Since JSONB is now used to store arguments, the order of argument hashes is no longer maintained.
414
+ ## 0.11.3 (2016-02-26)
308
415
 
309
- * It wouldn't have been a good idea to rely on this anyway.
416
+ - Fixed bug with displaying the current version of the que executable. ([#122](https://github.com/que-rb/que/pull/122)) (hardbap)
417
+ - Output to STDOUT when running via the executable or rake task is no longer buffered. This prevented logging in some cases. ([#129](https://github.com/que-rb/que/pull/129)) (hmarr)
418
+ - Officially added support for Ruby 2.2 and 2.3.
419
+ - String literals are now frozen on Ruby 2.3.
310
420
 
311
- * Calling Que.log() directly is no longer supported/recommended.
421
+ ## 0.11.2 (2015-09-09)
312
422
 
313
- * Features marked as deprecated in the final 0.x releases have been removed.
423
+ - Fix Job class constantizing when ActiveSupport isn't loaded. ([#121](https://github.com/que-rb/que/pull/121)) (godfat)
314
424
 
315
- * Finally, if you've built up your own tooling and customizations around Que, you may need to be aware of some DB schema changes made in the migration to schema version #4.
425
+ ## 0.11.1 (2015-09-04)
316
426
 
317
- * The `job_id` column has been renamed `id` and is now the primary key. This makes it easier to manage the queue using an ActiveRecord model.
427
+ - The `rake que:work` rake task that was specific to Rails has been deprecated and will be removed in Que 1.0. A deprecation warning will display when it is run.
318
428
 
319
- * Finished jobs are now kept in the DB, unless you explicitly call `destroy`. If you want to query the DB for only jobs that haven't finished yet, add a `WHERE finished_at IS NULL` condition to your query, or use the not_finished scope on one of the provided ORM models.
429
+ ## 0.11.0 (2015-09-04)
320
430
 
321
- * There is now an `expired_at` timestamp column, which is set when a job reaches its maximum number of retries and will not be attempted again.
431
+ - A command-line program has been added that can be used to work jobs in a more flexible manner than the previous rake task. Run `que -h` for more information.
432
+ - The worker pool will no longer start automatically in the same process when running the rails server - this behavior was too prone to breakage. If you'd like to recreate the old behavior, you can manually set `Que.mode = :async` in your app whenever conditions are appropriate (classes have loaded, a database connection has been established, and the process will not be forking).
433
+ - Add a Que.disable_prepared_transactions= configuration option, to make it easier to use tools like pgbouncer. ([#110](https://github.com/que-rb/que/issues/110))
434
+ - Add a Que.json_converter= option, to configure how arguments are transformed before being passed to the job. By default this is set to the `Que::INDIFFERENTIATOR` proc, which provides simple indifferent access (via strings or symbols) to args hashes. If you're using Rails, the default is to convert the args to HashWithIndifferentAccess instead. You can also pass it the Que::SYMBOLIZER proc, which will destructively convert all keys in the args hash to symbols (this will probably be the default in Que 1.0). If you want to define a custom converter, you will usually want to pass this option a proc, and you'll probably want it to be recursive. See the implementations of Que::INDIFFERENTIATOR and Que::SYMBOLIZER for examples. ([#113](https://github.com/que-rb/que/issues/113))
435
+ - When using Que with ActiveRecord, workers now call `ActiveRecord::Base.clear_active_connections!` between jobs. This cleans up connections that ActiveRecord leaks when it is used to access mutliple databases. ([#116](https://github.com/que-rb/que/pull/116))
436
+ - If it exists, use String#constantize to constantize job classes, since ActiveSupport's constantize method behaves better with Rails' autoloading. ([#115](https://github.com/que-rb/que/issues/115), [#120](https://github.com/que-rb/que/pull/120)) (joevandyk)
322
437
 
323
- * Due to popular demand, the default queue name is now "default" rather than an empty string. The migration will move pending jobs under the "" queue to the "default" queue.
438
+ ## 0.10.0 (2015-03-18)
324
439
 
325
- * The `last_error` column has been split in two, to `last_error_message` and `last_error_backtrace`. These two columns are now limited to 500 and 10,000 characters, respectively. The migration will split old error data correctly, and truncate it if necessary.
440
+ - When working jobs via the rake task, Rails applications are now eager-loaded if present, to avoid problems with multithreading and autoloading. ([#96](https://github.com/que-rb/que/pull/96)) (hmarr)
441
+ - The que:work rake task now uses whatever logger Que is configured to use normally, rather than forcing the use of STDOUT. ([#95](https://github.com/que-rb/que/issues/95))
442
+ - Add Que.transaction() helper method, to aid in transaction management in migrations or when the user's ORM doesn't provide one. ([#81](https://github.com/que-rb/que/issues/81))
326
443
 
327
- * Names for queues and job classes are now limited to 500 characters, which is still far longer than either of these values should reasonably be.
444
+ ## 0.9.2 (2015-02-05)
328
445
 
329
- * There is now a `data` JSONB column which is used to support various ways of organizing jobs (setting tags on them, etc).
446
+ - Fix a bug wherein the at_exit hook in the railtie wasn't waiting for jobs to finish before exiting.
447
+ - Fix a bug wherein the que:work rake task wasn't waiting for jobs to finish before exiting. ([#85](https://github.com/que-rb/que/pull/85)) (tycooon)
330
448
 
331
- ---
449
+ ## 0.9.1 (2015-01-11)
332
450
 
333
- ### 0.14.3 (2018-03-02)
451
+ - Use now() rather than 'now' when inserting jobs, to avoid using an old value as the default run_at in prepared statements. ([#74](https://github.com/que-rb/que/pull/74)) (bgentry)
334
452
 
335
- * Recorded errors now always include the error class, so that empty error messages can still be helpful. ( joehorsnell)
453
+ ## 0.9.0 (2014-12-16)
336
454
 
337
- * Recorded error messages are now truncated to the first 500 characters.
455
+ - The error_handler callable is now passed two objects, the error and the job that raised it. If your current error_handler is a proc, as recommended in the docs, you shouldn't need to make any code changes, unless you want to use the job in your error handling. If your error_handler is a lambda, or another callable with a strict arity requirement, you'll want to change it before upgrading. ([#69](https://github.com/que-rb/que/pull/69)) (statianzo)
338
456
 
339
- ---
457
+ ## 0.8.2 (2014-10-12)
340
458
 
341
- ### 0.14.2 (2018-01-05)
459
+ - Fix errors raised during rollbacks in the ActiveRecord adapter, which remained silent until Rails 4.2. ([#64](https://github.com/que-rb/que/pull/64), [#65](https://github.com/que-rb/que/pull/65)) (Strech)
342
460
 
343
- * Deprecate the Que.disable_prepared_statements= accessors.
461
+ ## 0.8.1 (2014-07-28)
344
462
 
345
- * Add Que.use_prepared_statements= configuration accessors.
463
+ - Fix regression introduced in the `que:work` rake task by the `mode` / `worker_count` disentangling in 0.8.0. ([#50](https://github.com/que-rb/que/issues/50))
346
464
 
347
- * Update the generated Rails migration to declare a version. (NARKOZ)
465
+ ## 0.8.0 (2014-07-12)
348
466
 
349
- ---
467
+ - A callable can now be set as the logger, like `Que.logger = proc { MyLogger.new }`. Que uses this in its Railtie for cleaner initialization, but it is also available for public use.
468
+ - `Que.mode=` and `Que.worker_count=` now function independently. That is, setting the worker_count to a nonzero number no longer sets mode = :async (triggering the pool to start working jobs), and setting it to zero no longer sets mode = :off. Similarly, setting the mode to :async no longer sets the worker_count to 4 from 0, and setting the mode to :off no longer sets the worker_count to 0. This behavior was changed because it was interfering with configuration during initialization of Rails applications, and because it was unexpected. ([#47](https://github.com/que-rb/que/issues/47))
469
+ - Fixed a similar bug wherein setting a wake_interval during application startup would break worker awakening after the process was forked.
350
470
 
351
- ### 0.14.1 (2017-12-14)
471
+ ## 0.7.3 (2014-05-19)
352
472
 
353
- * Fix a bug with typecasting boolean values on Rails 5+.
473
+ - When mode = :sync, don't touch the database at all when running jobs inline. Needed for ActiveJob compatibility ([#46](https://github.com/que-rb/que/issues/46)).
354
474
 
355
- ---
475
+ ## 0.7.2 (2014-05-18)
356
476
 
357
- ### 0.14.0 (2017-08-11)
477
+ - Fix issue wherein intermittent worker wakeups would not work after forking ([#44](https://github.com/que-rb/que/issues/44)).
358
478
 
359
- * Fix incompatibility with Rails 5.1.
479
+ ## 0.7.1 (2014-04-29)
360
480
 
361
- * Drop support for waking an in-process worker when an ActiveRecord transaction commits.
481
+ - Fix errors with prepared statements when ActiveRecord reconnects to the database. (dvrensk)
482
+ - Don't use prepared statements when inside a transaction. This negates the risk of a prepared statement error harming the entire transaction. The query that benefits the most from preparation is the job-lock CTE, which is never run in a transaction, so the performance impact should be negligible.
362
483
 
363
- ---
484
+ ## 0.7.0 (2014-04-09)
364
485
 
365
- ### 0.13.1 (2017-07-05)
486
+ - `JobClass.queue(*args)` has been deprecated and will be removed in version 1.0.0. Please use `JobClass.enqueue(*args)` instead.
487
+ - The `@default_priority` and `@default_run_at` variables have been deprecated and will be removed in version 1.0.0. Please use `@priority` and `@run_at` instead, respectively.
488
+ - Log lines now include the process pid - its omission in the previous release was an oversight.
489
+ - The [Pond gem](https://github.com/chanks/pond) is now supported as a connection. It is very similar to the ConnectionPool gem, but creates connections lazily and is dynamically resizable.
366
490
 
367
- * Fix issue that caused error stacktraces to not be persisted in most cases.
491
+ ## 0.6.0 (2014-02-04)
368
492
 
369
- ---
493
+ - **A schema upgrade to version 3 is required for this release.** See [the migration doc](https://github.com/que-rb/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.
494
+ - You can now run a job's logic directly (without enqueueing it) like `MyJob.run(arg1, arg2, other_arg: arg3)`. This is useful when a job class encapsulates logic that you want to invoke without involving the entire queue.
495
+ - You can now check the current version of Que's database schema with `Que.db_version`.
496
+ - The method for enqueuing a job has been renamed from `MyJob.queue` to `MyJob.enqueue`, since we were beginning to use the word 'queue' in a LOT of places. `MyJob.queue` still works, but it may be removed at some point.
497
+ - The variables for setting the defaults for a given job class have been changed from `@default_priority` to `@priority` and `@default_run_at` to `@run_at`. The old variables still work, but like `Job.queue`, they may be removed at some point.
498
+ - Log lines now include the machine's hostname, since a pid alone may not uniquely identify a process.
499
+ - Multiple queues are now supported. See [the docs](https://github.com/que-rb/que/blob/master/docs/multiple_queues.md) for details. (chanks, joevandyk)
500
+ - Rubinius 2.2 is now supported. (brixen)
501
+ - Job classes may now define their own logic for determining the retry interval when a job raises an error. See [error handling](https://github.com/que-rb/que/blob/master/docs/error_handling.md) for more information.
370
502
 
371
- ### 0.13.0 (2017-06-08)
503
+ ## 0.5.0 (2014-01-14)
372
504
 
373
- * Fix recurring JSON issues by dropping MultiJson support. Previously MultiJson was detected and used automatically, and now it's just ignored and stdlib JSON used instead, so this shouldn't require any code changes.
374
-
375
- ---
376
-
377
- ### 0.12.3 (2017-06-01)
378
-
379
- * Fix incompatibility with MultiJson introduced by the previous release.
380
-
381
- ### 0.12.2 (2017-06-01)
382
-
383
- * Fix security vulnerability in parsing JSON from the DB (by specifying create_additions: false). This shouldn't be a concern unless you were passing untrusted user input in your job arguments. (hmac)
384
-
385
- ---
386
-
387
- ### 0.12.1 (2017-01-22)
388
-
389
- * Fix incompatibility with Rails 5.0. (#166) (nbibler, thedarkone)
390
-
391
- ---
392
-
393
- ### 0.12.0 (2016-09-09)
394
-
395
- * The error_handler configuration option has been renamed to error_notifier, which is more descriptive of what it's actually supposed to do. You can still use error_handler for configuration, but you'll get a warning.
396
-
397
- * Introduced a new framework for handling errors on a per-job basis. See the docs for more information. (#106, #147)
398
-
399
- ---
400
-
401
- ### 0.11.6 (2016-07-01)
402
-
403
- * Fix for operating in nested transactions in Rails 5.0. (#160) (greysteil)
404
-
405
- ---
406
-
407
- ### 0.11.5 (2016-05-13)
408
-
409
- * Fix error when running `que -v`. (#154) (hardbap)
410
-
411
- ---
412
-
413
- ### 0.11.4 (2016-03-03)
414
-
415
- * Fix incompatibility with ActiveRecord 5.0.0.beta3. (#143, #144) (joevandyk)
416
-
417
- ---
418
-
419
- ### 0.11.3 (2016-02-26)
420
-
421
- * Fixed bug with displaying the current version of the que executable. (#122) (hardbap)
422
-
423
- * Output to STDOUT when running via the executable or rake task is no longer buffered. This prevented logging in some cases. (#129) (hmarr)
424
-
425
- * Officially added support for Ruby 2.2 and 2.3.
426
-
427
- * String literals are now frozen on Ruby 2.3.
428
-
429
- ---
430
-
431
- ### 0.11.2 (2015-09-09)
432
-
433
- * Fix Job class constantizing when ActiveSupport isn't loaded. (#121) (godfat)
434
-
435
- ---
436
-
437
- ### 0.11.1 (2015-09-04)
438
-
439
- * The `rake que:work` rake task that was specific to Rails has been deprecated and will be removed in Que 1.0. A deprecation warning will display when it is run.
440
-
441
- ---
442
-
443
- ### 0.11.0 (2015-09-04)
444
-
445
- * A command-line program has been added that can be used to work jobs in a more flexible manner than the previous rake task. Run `que -h` for more information.
446
-
447
- * The worker pool will no longer start automatically in the same process when running the rails server - this behavior was too prone to breakage. If you'd like to recreate the old behavior, you can manually set `Que.mode = :async` in your app whenever conditions are appropriate (classes have loaded, a database connection has been established, and the process will not be forking).
448
-
449
- * Add a Que.disable_prepared_transactions= configuration option, to make it easier to use tools like pgbouncer. (#110)
450
-
451
- * Add a Que.json_converter= option, to configure how arguments are transformed before being passed to the job. By default this is set to the `Que::INDIFFERENTIATOR` proc, which provides simple indifferent access (via strings or symbols) to args hashes. If you're using Rails, the default is to convert the args to HashWithIndifferentAccess instead. You can also pass it the Que::SYMBOLIZER proc, which will destructively convert all keys in the args hash to symbols (this will probably be the default in Que 1.0). If you want to define a custom converter, you will usually want to pass this option a proc, and you'll probably want it to be recursive. See the implementations of Que::INDIFFERENTIATOR and Que::SYMBOLIZER for examples. (#113)
452
-
453
- * When using Que with ActiveRecord, workers now call `ActiveRecord::Base.clear_active_connections!` between jobs. This cleans up connections that ActiveRecord leaks when it is used to access mutliple databases. (#116)
454
-
455
- * If it exists, use String#constantize to constantize job classes, since ActiveSupport's constantize method behaves better with Rails' autoloading. (#115, #120) (joevandyk)
456
-
457
- ---
458
-
459
- ### 0.10.0 (2015-03-18)
460
-
461
- * When working jobs via the rake task, Rails applications are now eager-loaded if present, to avoid problems with multithreading and autoloading. (#96) (hmarr)
462
-
463
- * The que:work rake task now uses whatever logger Que is configured to use normally, rather than forcing the use of STDOUT. (#95)
464
-
465
- * Add Que.transaction() helper method, to aid in transaction management in migrations or when the user's ORM doesn't provide one. (#81)
466
-
467
- ---
468
-
469
- ### 0.9.2 (2015-02-05)
470
-
471
- * Fix a bug wherein the at_exit hook in the railtie wasn't waiting for jobs to finish before exiting.
472
-
473
- * Fix a bug wherein the que:work rake task wasn't waiting for jobs to finish before exiting. (#85) (tycooon)
474
-
475
- ---
476
-
477
- ### 0.9.1 (2015-01-11)
478
-
479
- * Use now() rather than 'now' when inserting jobs, to avoid using an old value as the default run_at in prepared statements. (#74) (bgentry)
480
-
481
- ---
482
-
483
- ### 0.9.0 (2014-12-16)
484
-
485
- * The error_handler callable is now passed two objects, the error and the job that raised it. If your current error_handler is a proc, as recommended in the docs, you shouldn't need to make any code changes, unless you want to use the job in your error handling. If your error_handler is a lambda, or another callable with a strict arity requirement, you'll want to change it before upgrading. (#69) (statianzo)
486
-
487
- ---
488
-
489
- ### 0.8.2 (2014-10-12)
490
-
491
- * Fix errors raised during rollbacks in the ActiveRecord adapter, which remained silent until Rails 4.2. (#64, #65) (Strech)
492
-
493
- ---
494
-
495
- ### 0.8.1 (2014-07-28)
496
-
497
- * Fix regression introduced in the `que:work` rake task by the `mode` / `worker_count` disentangling in 0.8.0. (#50)
498
-
499
- ---
500
-
501
- ### 0.8.0 (2014-07-12)
502
-
503
- * A callable can now be set as the logger, like `Que.logger = proc { MyLogger.new }`. Que uses this in its Railtie for cleaner initialization, but it is also available for public use.
504
-
505
- * `Que.mode=` and `Que.worker_count=` now function independently. That is, setting the worker_count to a nonzero number no longer sets mode = :async (triggering the pool to start working jobs), and setting it to zero no longer sets mode = :off. Similarly, setting the mode to :async no longer sets the worker_count to 4 from 0, and setting the mode to :off no longer sets the worker_count to 0. This behavior was changed because it was interfering with configuration during initialization of Rails applications, and because it was unexpected. (#47)
506
-
507
- * Fixed a similar bug wherein setting a wake_interval during application startup would break worker awakening after the process was forked.
508
-
509
- ---
510
-
511
- ### 0.7.3 (2014-05-19)
512
-
513
- * When mode = :sync, don't touch the database at all when running jobs inline. Needed for ActiveJob compatibility (#46).
514
-
515
- ---
516
-
517
- ### 0.7.2 (2014-05-18)
518
-
519
- * Fix issue wherein intermittent worker wakeups would not work after forking (#44).
520
-
521
- ---
522
-
523
- ### 0.7.1 (2014-04-29)
524
-
525
- * Fix errors with prepared statements when ActiveRecord reconnects to the database. (dvrensk)
526
-
527
- * Don't use prepared statements when inside a transaction. This negates the risk of a prepared statement error harming the entire transaction. The query that benefits the most from preparation is the job-lock CTE, which is never run in a transaction, so the performance impact should be negligible.
528
-
529
- ---
530
-
531
- ### 0.7.0 (2014-04-09)
532
-
533
- * `JobClass.queue(*args)` has been deprecated and will be removed in version 1.0.0. Please use `JobClass.enqueue(*args)` instead.
534
-
535
- * The `@default_priority` and `@default_run_at` variables have been deprecated and will be removed in version 1.0.0. Please use `@priority` and `@run_at` instead, respectively.
536
-
537
- * Log lines now include the process pid - its omission in the previous release was an oversight.
538
-
539
- * The [Pond gem](https://github.com/chanks/pond) is now supported as a connection. It is very similar to the ConnectionPool gem, but creates connections lazily and is dynamically resizable.
540
-
541
- ---
542
-
543
- ### 0.6.0 (2014-02-04)
544
-
545
- * **A schema upgrade to version 3 is required for this release.** See [the migration doc](https://github.com/que-rb/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.
546
-
547
- * You can now run a job's logic directly (without enqueueing it) like `MyJob.run(arg1, arg2, other_arg: arg3)`. This is useful when a job class encapsulates logic that you want to invoke without involving the entire queue.
548
-
549
- * You can now check the current version of Que's database schema with `Que.db_version`.
550
-
551
- * The method for enqueuing a job has been renamed from `MyJob.queue` to `MyJob.enqueue`, since we were beginning to use the word 'queue' in a LOT of places. `MyJob.queue` still works, but it may be removed at some point.
552
-
553
- * The variables for setting the defaults for a given job class have been changed from `@default_priority` to `@priority` and `@default_run_at` to `@run_at`. The old variables still work, but like `Job.queue`, they may be removed at some point.
554
-
555
- * Log lines now include the machine's hostname, since a pid alone may not uniquely identify a process.
556
-
557
- * Multiple queues are now supported. See [the docs](https://github.com/que-rb/que/blob/master/docs/multiple_queues.md) for details. (chanks, joevandyk)
558
-
559
- * Rubinius 2.2 is now supported. (brixen)
560
-
561
- * Job classes may now define their own logic for determining the retry interval when a job raises an error. See [error handling](https://github.com/que-rb/que/blob/master/docs/error_handling.md) for more information.
562
-
563
- ---
564
-
565
- ### 0.5.0 (2014-01-14)
566
-
567
- * When running a worker pool inside your web process on ActiveRecord, Que will now wake a worker once a transaction containing a queued job is committed. (joevandyk, chanks)
568
-
569
- * The `que:work` rake task now has a default wake_interval of 0.1 seconds, since it relies exclusively on polling to pick up jobs. You can set a QUE_WAKE_INTERVAL environment variable to change this. The environment variable to set a size for the worker pool in the rake task has also been changed from WORKER_COUNT to QUE_WORKER_COUNT.
570
-
571
- * Officially support Ruby 1.9.3. Note that due to the Thread#kill problems (see "Remove Que.stop!" below) there's a danger of data corruption when running under 1.9, though.
572
-
573
- * The default priority for jobs is now 100 (it was 1 before). Like always (and like delayed_job), a lower priority means it's more important. You can migrate the schema version to 2 to set the new default value on the que_jobs table, though it's only necessary if you're doing your own INSERTs - if you use `MyJob.queue`, it's already taken care of.
574
-
575
- * Added a migration system to make it easier to change the schema when updating Que. You can now write, for example, `Que.migrate!(version: 2)` in your migrations. Migrations are run transactionally.
576
-
577
- * The logging format has changed to be more easily machine-readable. You can also now customize the logging format by assigning a callable to Que.log_formatter=. See the new doc on [logging](https://github.com/que-rb/que/blob/master/docs/logging.md)) for details. The default logger level is INFO - for less critical information (such as when no jobs were found to be available or when a job-lock race condition has been detected and avoided) you can set the QUE_LOG_LEVEL environment variable to DEBUG.
578
-
579
- * MultiJson is now a soft dependency. Que will use it if it is available, but it is not required.
580
-
581
- * Remove Que.stop!.
505
+ - When running a worker pool inside your web process on ActiveRecord, Que will now wake a worker once a transaction containing a queued job is committed. (joevandyk, chanks)
506
+ - The `que:work` rake task now has a default wake_interval of 0.1 seconds, since it relies exclusively on polling to pick up jobs. You can set a QUE_WAKE_INTERVAL environment variable to change this. The environment variable to set a size for the worker pool in the rake task has also been changed from WORKER_COUNT to QUE_WORKER_COUNT.
507
+ - Officially support Ruby 1.9.3. Note that due to the Thread#kill problems (see "Remove Que.stop!" below) there's a danger of data corruption when running under 1.9, though.
508
+ - The default priority for jobs is now 100 (it was 1 before). Like always (and like delayed_job), a lower priority means it's more important. You can migrate the schema version to 2 to set the new default value on the que_jobs table, though it's only necessary if you're doing your own INSERTs - if you use `MyJob.queue`, it's already taken care of.
509
+ - Added a migration system to make it easier to change the schema when updating Que. You can now write, for example, `Que.migrate!(version: 2)` in your migrations. Migrations are run transactionally.
510
+ - The logging format has changed to be more easily machine-readable. You can also now customize the logging format by assigning a callable to Que.log_formatter=. See the new doc on [logging](https://github.com/que-rb/que/blob/master/docs/logging.md)) for details. The default logger level is INFO - for less critical information (such as when no jobs were found to be available or when a job-lock race condition has been detected and avoided) you can set the QUE_LOG_LEVEL environment variable to DEBUG.
511
+ - MultiJson is now a soft dependency. Que will use it if it is available, but it is not required.
512
+ - Remove Que.stop!.
582
513
 
583
514
  Using Thread#raise to kill workers is a bad idea - the results are unpredictable and nearly impossible to spec reliably. Its purpose was to prevent premature commits in ActiveRecord/Sequel when a thread is killed during shutdown, but it's possible to detect that situation on Ruby 2.0+, so this is really better handled by the ORMs directly. See the pull requests for [Sequel](https://github.com/jeremyevans/sequel/pull/752) and [ActiveRecord](https://github.com/rails/rails/pull/13656).
584
515
 
585
516
  Now, when a process exits, if the worker pool is running (whether in a rake task or in a web process) the exit will be stalled until all workers have finished their current jobs. If you have long-running jobs, this may take a long time. If you need the process to exit immediately, you can SIGKILL without any threat of commiting prematurely.
586
517
 
587
- ---
588
-
589
- ### 0.4.0 (2014-01-05)
518
+ ## 0.4.0 (2014-01-05)
590
519
 
591
- * Que.wake_all! was added, as a simple way to wake up all workers in the pool.
592
-
593
- * Que.sleep_period was renamed to the more descriptive Que.wake_interval.
594
-
595
- * When queueing a job, Que will wait until the current transaction commits and then wake a background worker, if possible. This allows newly queued jobs to be started immediately instead of waiting for a worker to wake up and poll, which may be up to `Que.wake_interval` seconds.
520
+ - Que.wake_all! was added, as a simple way to wake up all workers in the pool.
521
+ - Que.sleep_period was renamed to the more descriptive Que.wake_interval.
522
+ - When queueing a job, Que will wait until the current transaction commits and then wake a background worker, if possible. This allows newly queued jobs to be started immediately instead of waiting for a worker to wake up and poll, which may be up to `Que.wake_interval` seconds.
596
523
 
597
524
  This feature currently only works with Sequel, since there doesn't seem to be a clean way to do it on ActiveRecord (if anyone can figure one out, please let me know). Note that if you're using ActiveRecord, you can always manually trigger a single worker to wake up and check for work by manually calling Que.wake! after your transaction completes.
525
+ - Add Que.job_stats, which queries the database and returns statistics on the different job classes - for each class, how many are queued, how many are currently being worked, what is the highest error_count, and so on.
526
+ - Add Que.worker_states, which queries the database and returns all currently-locked jobs and info on their workers' connections - what and when was the last query they ran, are they waiting on locks, and so on.
527
+ - Have Que only clear advisory locks that it has taken when locking jobs, and not touch any that may have been taken by other code using the same connection.
528
+ - Add Que.worker_count, to retrieve the current number of workers in the pool of the current process.
529
+ - Much more internal cleanup.
598
530
 
599
- * Add Que.job_stats, which queries the database and returns statistics on the different job classes - for each class, how many are queued, how many are currently being worked, what is the highest error_count, and so on.
600
-
601
- * Add Que.worker_states, which queries the database and returns all currently-locked jobs and info on their workers' connections - what and when was the last query they ran, are they waiting on locks, and so on.
602
-
603
- * Have Que only clear advisory locks that it has taken when locking jobs, and not touch any that may have been taken by other code using the same connection.
531
+ ## 0.3.0 (2013-12-21)
604
532
 
605
- * Add Que.worker_count, to retrieve the current number of workers in the pool of the current process.
606
-
607
- * Much more internal cleanup.
608
-
609
- ---
610
-
611
- ### 0.3.0 (2013-12-21)
612
-
613
- * Add Que.stop!, which immediately kills all jobs being worked in the process.
533
+ - Add Que.stop!, which immediately kills all jobs being worked in the process.
614
534
 
615
535
  This can leave database connections and such in an unpredictable state, and so should only be used when the process is exiting.
616
-
617
- * Use Que.stop! to safely handle processes that exit while Que is running.
536
+ - Use Que.stop! to safely handle processes that exit while Que is running.
618
537
 
619
538
  Previously, a job that was in the middle of a transaction when the process was killed with SIGINT or SIGTERM would have had its work committed prematurely.
539
+ - Clean up internals and hammer out several race conditions.
620
540
 
621
- * Clean up internals and hammer out several race conditions.
622
-
623
- ---
541
+ ## 0.2.0 (2013-11-30)
624
542
 
625
- ### 0.2.0 (2013-11-30)
626
-
627
- * Officially support JRuby 1.7.5+. Earlier versions may work.
543
+ - Officially support JRuby 1.7.5+. Earlier versions may work.
628
544
 
629
545
  JRuby support requires the use of the `jruby-pg` gem, though that gem seems to currently be incompatible with ActiveRecord, so the ActiveRecord adapter specs don't pass (or even run). It works fine with Sequel and the other adapters, though.
546
+ - Officially support Rubinius 2.1.1+. Earlier versions may work.
547
+ - Use `multi_json` so we always use the fastest JSON parser available. (BukhariH)
548
+ - :sync mode now ignores scheduled jobs (jobs queued with a specific run_at).
630
549
 
631
- * Officially support Rubinius 2.1.1+. Earlier versions may work.
632
-
633
- * Use `multi_json` so we always use the fastest JSON parser available. (BukhariH)
634
-
635
- * :sync mode now ignores scheduled jobs (jobs queued with a specific run_at).
636
-
637
- ---
638
-
639
- ### 0.1.0 (2013-11-18)
640
-
641
- * Initial public release, after a test-driven rewrite.
642
-
643
- Officially support Ruby 2.0.0 and Postgres 9.2+.
644
-
645
- Also support ActiveRecord and bare PG::Connections, in or out of a ConnectionPool.
646
-
647
- Added a Railtie for easier setup with Rails, as well as a migration generator.
550
+ ## 0.1.0 (2013-11-18)
648
551
 
649
- ---
552
+ - Initial public release, after a test-driven rewrite.
553
+ - Officially support Ruby 2.0.0 and Postgres 9.2+.
554
+ - Also support ActiveRecord and bare PG::Connections, in or out of a ConnectionPool.
555
+ - Added a Railtie for easier setup with Rails, as well as a migration generator.
650
556
 
651
- ### 0.0.1 (2013-11-07)
557
+ ## 0.0.1 (2013-11-07)
652
558
 
653
- * Copy-pasted from an app of mine. Very Sequel-specific. Nobody look at it, let's pretend it never happened.
559
+ - Copy-pasted from an app of mine. Very Sequel-specific. Nobody look at it, let's pretend it never happened.