<commit_before>### 1.0.0.alpha (Unreleased)

*   **A schema upgrade to version 4 will be required for this release.** See [the migration doc](https://github.com/chanks/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.

*   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:

    *   Individual workers no longer need to monopolize their own (possibly idle) connections while working jobs, so Ruby processes may require many fewer Postgres connections.

    *   PgBouncer can be used for workers' connections (though not for the connection used to lock and listen for jobs).

    *   Jobs queued for immediate processing can be actively distributed to workers with LISTEN/NOTIFY, which is more efficient than repeatedly polling for new jobs.

    *   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 in batches, rather than one at a time.

*   Other features introduced in this version include:

    *   `Que.connection_proc=` has been added, to allow for the easy integration of custom connection pools.

    *   `Que.job_states` returns a list of locked jobs and the hostname/pid of the Ruby processes that have locked them.

*   In keeping with semantic versioning, the major version is being bumped since the new implementation requires some backwards-incompatible changes. These changes include:

    *   The Railtie and Rake tasks providing simple integration with Rails have been moved to another gem (TODO: publish and link here).

    *   JRuby support has been dropped. It will be reintroduced when the jruby-pg gem [fully supports PG::Connection#wait_for_notify](https://github.com/headius/jruby-pg/issues/13).

    *   `Que.wake_interval`, `Que.wake_interval=`, `Que.wake!`, `Que.wake_all!`, `Que.worker_count`, `Que.worker_count=` and `Que.disable_prepared_statements=` are not usable under the new implementation, and so have been removed.

    *   It is no longer possible to run Que through a single PG connection. A connection pool with a size of at least 2 is required.

    *   `Que.worker_states` has been removed, as it is no longer possible to inspect the Postgres connection that is working each job. Its functionality has been partially replaced with `Que.job_states`.

    *   For simplicity, job attributes and keys in argument hashes are now converted to symbols when retrieved from the database, rather than made indifferently-accessible. If you are presently allowing uncontrolled input to be used as keys in the arguments hash (or as keys in a hash nested within the arguments hash), you should either fix that or use a Ruby implementation that garbage-collects symbols, such as MRI 2.2+.

    *   Que no longer uses prepared statements for its built-in queries, since they weren't compatible with configurable tables. This should have no outward-facing change, except that the `Que.use_prepared_statements` configuration accessor no longer exists.

    *   Features marked as deprecated in the previous release have been removed.

*   Other new features:

    *   Que now includes a RecurringJob class that implements all the logic for reliable recurring jobs. See the docs for more information.

### 0.11.0 (Unreleased)

*   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.

*   The `rake que:work` rake task that was specific to Rails has been removed in favor of the CLI, and the various QUE_* environment variables no longer have any effect.

*   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).

*   Add a Que.disable_prepared_transactions= configuration option, to make it easier to use tools like pgbouncer. (#110)<commit_msg>CHANGELOG tweaks.<commit_after>### 1.0.0.alpha (Unreleased)

*   **A schema upgrade to version 4 will be required for this release.** See [the migration doc](https://github.com/chanks/que/blob/master/docs/migrating.md) for information if you're upgrading from a previous release.

*   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:

    *   Individual workers no longer need to monopolize their own (possibly idle) connections while working jobs, so Ruby processes may require many fewer Postgres connections.

    *   PgBouncer can be used for workers' connections (though not for the connection used to lock and listen for jobs).

    *   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.

    *   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 in batches, rather than one at a time.

*   Other features introduced in this version include:

    *   `Que.connection_proc=` has been added, to allow for the easy integration of custom connection pools.

    *   `Que.job_states` returns a list of locked jobs and the hostname/pid of the Ruby processes that have locked them.

*   In keeping with semantic versioning, the major version is being bumped since the new implementation requires some backwards-incompatible changes. These changes include:

    *   The Railtie providing simple integration with Rails has been moved to another gem (TODO: publish and link here).

    *   JRuby support has been dropped. It will be reintroduced when the jruby-pg gem [fully supports PG::Connection#wait_for_notify](https://github.com/headius/jruby-pg/issues/13).

    *   Que no longer uses prepared statements for its built-in queries, since they weren't compatible with multiple job queues. This should have no outward-facing change, except that the `Que.disable_prepared_statements` configuration accessor no longer exists.

    *   In addition to `Que.disable_prepared_statements=`, the following configuration options are not usable under the new implementation and have been removed: `Que.wake_interval`, `Que.wake_interval=`, `Que.wake!`, `Que.wake_all!`, `Que.worker_count`, `Que.worker_count=`.

    *   Since Que needs a dedicated Postgres connection to manage job locks, it is no longer possible to run Que through a single PG connection. A connection pool with a size of at least 2 is required. (Note that it is possible to pass Que a connection pool containing a single connection if you provide a separate dedicated connection to the job locker).

    *   `Que.worker_states` has been removed, as it is no longer possible to know which Postgres connection is working each job. Its functionality has been partially replaced with `Que.job_states`.

    *   For simplicity, the new default for job attributes and keys in argument hashes are now converted to symbols when retrieved from the database, rather than made indifferently-accessible. If you are presently allowing uncontrolled input to be used as keys in the arguments hash (or as keys in a hash nested within the arguments hash), you should either fix that or use a Ruby implementation that garbage-collects symbols, such as MRI 2.2+. You can go back to the old behavior by setting `Que.json_converter = Que::INDIFFERENTIATOR`. If you are using the `que-rails` gem, args hashes will be instances of HashWithIndifferentAccess, as before.

    *   Features marked as deprecated in 0.x releases have been removed.

*   Other new features:

    *   Que now includes a RecurringJob class that implements all the logic for reliable recurring jobs. See the docs for more information.

### 0.11.0 (Unreleased)

*   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.

*   The `rake que:work` rake task that was specific to Rails has been removed in favor of the CLI, and the various QUE_* environment variables no longer have any effect.

*   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).

*   Add a Que.disable_prepared_transactions= configuration option, to make it easier to use tools like pgbouncer. (#110)
{'fraction_non_alphanumeric': 0.05179110919292188, 'fraction_numerical': 0.0035606387570133796, 'mean_word_length': 4.1437291897891235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3542005', 'n_tokens_mistral': 2323, 'n_tokens_neox': 2181, 'n_words': 1312}