Skip to content

Update rq to 2.2.0#863

Closed
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-rq-0.12.0-to-2.2.0
Closed

Update rq to 2.2.0#863
pyup-bot wants to merge 1 commit intomasterfrom
pyup-update-rq-0.12.0-to-2.2.0

Conversation

@pyup-bot
Copy link
Copy Markdown
Collaborator

This PR updates rq from 0.12.0 to 2.2.0.

Changelog

2.2.0

- Support for Django 3.0. This release also drops support for Django 1.X. Thanks hugorodgerbrown!
- `rqworker` management command now properly passes in `--verbosity` to `Worker`. Thanks stlk!
- The admin interface can now view jobs with `:` on their IDs. Thanks carboncoop!
- Job detail page now shows `job.dependency`. Thanks selwin!

2.1.0

- Fixed `Requeue All`
- Django-RQ now automatically runs maintenance tasks when `rq_home` is opened

2.0

- Compatibility with RQ 1.0 (Thanks selwin). Backward incompatible changes include:
* `FailedQueue` is now replaced by `FailedJobRegistry`
* RQ now uses `sentry-sdk` to send job failures to Sentry.
- Scheduler now respects default `timeout` and `result_ttl` defined in `RQ_QUEUES`. Thanks simone6021!
- Minor improvements and bug fixes. Thanks selwin!

1.16.2

* Fixed a bug that may cause jobs from intermediate queue to be moved to FailedJobRegistry. Thanks selwin!

1.16.1

* Added `worker_pool.get_worker_process()` to make `WorkerPool` easier to extend. Thanks selwin!

1.16

* Added a way for jobs to wait for latest result `job.latest_result(timeout=60)`. Thanks ajnisbet!
* Fixed an issue where `stopped_callback` is not respected when job is enqueued via `enqueue_many()`. Thanks eswolinsky3241!
* `worker-pool` no longer ignores `--quiet`. Thanks Mindiell!
* Added compatibility with AWS Serverless Redis. Thanks peter-gy!
* `worker-pool` now starts with scheduler. Thanks chromium7!

1.15.1

* Fixed a bug that may cause a crash when cleaning intermediate queue. Thanks selwin!
* Fixed a bug that may cause canceled jobs to still run dependent jobs. Thanks fredsod!

1.15

* Added `Callback(on_stopped='my_callback)`. Thanks eswolinsky3241!
* `Callback` now accepts dotted path to function as input. Thanks rishabh-ranjan!
* `queue.enqueue_many()` now supports job dependencies. Thanks eswolinsky3241!
* `rq worker` CLI script now configures logging based on `DICT_CONFIG` key present in config file. Thanks juur!
* Whenever possible, `Worker` now uses `lmove()` to implement [reliable queue pattern](https://redis.io/commands/lmove/). Thanks selwin!
* Require `redis>=4.0.0`
* `Scheduler` should only release locks that it successfully acquires. Thanks xzander!
* Fixes crashes that may happen by changes to `as_text()` function in v1.14. Thanks tchapi!
* Various linting, CI and code quality improvements. Thanks robhudson!

1.14.1

* Fixes a crash that happens if Redis connection uses SSL. Thanks tchapi!
* Fixes a crash if `job.meta()` is loaded using the wrong serializer. Thanks gabriels1234!

1.14.0

* Added `WorkerPool` (beta) that manages multiple workers in a single CLI. Thanks selwin!
* Added a new `Callback` class that allows more flexibility in declaring job callbacks. Thanks ronlut!
* Fixed a regression where jobs with unserializable return value crashes RQ. Thanks tchapi!
* Added `--dequeue-strategy` option to RQ's CLI. Thanks ccrvlh!
* Added `--max-idle-time` option to RQ's worker CLI. Thanks ronlut!
* Added `--maintenance-interval` option to RQ's worker CLI. Thanks ronlut!
* Fixed RQ usage in Windows as well as various other refactorings. Thanks ccrvlh!
* Show more info on `rq info` CLI command. Thanks iggeehu!
* `queue.enqueue_jobs()` now properly account for job dependencies. Thanks sim6!
* `TimerDeathPenalty` now properly handles negative/infinite timeout. Thanks marqueurs404!

1.13.0

* Added `work_horse_killed_handler` argument to `Worker`. Thanks ronlut!
* Fixed an issue where results aren't properly persisted on synchronous jobs. Thanks selwin!
* Fixed a bug where job results are not properly persisted when `result_ttl` is `-1`. Thanks sim6!
* Various documentation and logging fixes. Thanks lowercase00!
* Improve Redis connection reliability. Thanks lowercase00!
* Scheduler reliability improvements. Thanks OlegZv and lowercase00!
* Fixed a bug where `dequeue_timeout` ignores `worker_ttl`. Thanks ronlut!
* Use `job.return_value()` instead of `job.result` when processing callbacks. Thanks selwin!
* Various internal refactorings to make `Worker` code more easily extendable. Thanks lowercase00!
* RQ's source code is now black formatted. Thanks aparcar!

1.12.0

* RQ now stores multiple job execution results. This feature is only available on Redis >= 5.0 Redis Streams. Please refer to [the docs](https://python-rq.org/docs/results/) for more info. Thanks selwin!
* Improve performance when enqueueing many jobs at once. Thanks rggjan!
* Redis server version is now cached in connection object. Thanks odarbelaeze!
* Properly handle `at_front` argument when jobs are scheduled. Thanks gabriels1234!
* Add type hints to RQ's code base. Thanks lowercase00!
* Fixed a bug where exceptions are logged twice. Thanks selwin!
* Don't delete `job.worker_name` after job is finished. Thanks eswolinsky3241!

1.11.1

* `queue.enqueue_many()` now supports `on_success` and on `on_failure` arguments. Thanks y4n9squared!
* You can now pass `enqueue_at_front` to `Dependency()` objects to put dependent jobs at the front when they are enqueued. Thanks jtfidje!
* Fixed a bug where workers may wrongly acquire scheduler locks. Thanks milesjwinter!
* Jobs should not be enqueued if any one of it's dependencies is canceled. Thanks selwin!
* Fixed a bug when handling jobs that have been stopped. Thanks ronlut!
* Fixed a bug in handling Redis connections that don't allow `SETNAME` command. Thanks yilmaz-burak!

1.11

* This will be the last RQ version that supports Python 3.5.
* Allow jobs to be enqueued even when their dependencies fail via `Dependency(allow_failure=True)`. Thanks mattchan-tencent, caffeinatedMike and selwin!
* When stopped jobs are deleted, they should also be removed from FailedJobRegistry. Thanks selwin!
* `job.requeue()` now supports `at_front()` argument. Thanks buroa!
* Added ssl support for sentinel connections. Thanks nevious!
* `SimpleWorker` now works better on Windows. Thanks caffeinatedMike!
* Added `on_failure` and `on_success` arguments to job decorator. Thanks nepta1998!
* Fixed a bug in dependency handling. Thanks th3hamm0r!
* Minor fixes and optimizations by xavfernandez, olaure, kusaku.

1.10.1

* **BACKWARDS INCOMPATIBLE**: synchronous execution of jobs now correctly mimics async job execution. Exception is no longer raised when a job fails, job status will now be correctly set to `FAILED` and failure callbacks are now properly called when job is run synchronously. Thanks ericman93!
* Fixes a bug that could cause job keys to be left over when `result_ttl=0`. Thanks selwin!
* Allow `ssl_cert_reqs` argument to be passed to Redis. Thanks mgcdanny!
* Better compatibility with Python 3.10. Thanks rpkak!
* `job.cancel()` should also remove itself from registries. Thanks joshcoden!
* Pubsub threads are now launched in `daemon` mode. Thanks mik3y!

1.10.0

* You can now enqueue jobs from CLI. Docs [here](https://python-rq.org/docs/#cli-enqueueing). Thanks rpkak!
* Added a new `CanceledJobRegistry` to keep track of canceled jobs. Thanks selwin!
* Added custom serializer support to various places in RQ. Thanks joshcoden!
* `cancel_job(job_id, enqueue_dependents=True)` allows you to cancel a job while enqueueing its dependents. Thanks joshcoden!
* Added `job.get_meta()` to fetch fresh meta value directly from Redis. Thanks aparcar!
* Fixes a race condition that could cause jobs to be incorrectly added to FailedJobRegistry. Thanks selwin!
* Requeueing a job now clears `job.exc_info`. Thanks selwin!
* Repo infrastructure improvements by rpkak.
* Other minor fixes by cesarferradas and bbayles.

1.9.0

* Added success and failure callbacks. You can now do `queue.enqueue(foo, on_success=do_this, on_failure=do_that)`. Thanks selwin!
* Added `queue.enqueue_many()` to enqueue many jobs in one go. Thanks joshcoden!
* Various improvements to CLI commands. Thanks rpkak!
* Minor logging improvements. Thanks clavigne and natbusa!

1.8.1

* Jobs that fail due to hard shutdowns are now retried. Thanks selwin!
* `Scheduler` now works with custom serializers. Thanks alella!
* Added support for click 8.0. Thanks rpkak!
* Enqueueing static methods are now supported. Thanks pwws!
* Job exceptions no longer get printed twice. Thanks petrem!

1.8.0

* You can now declare multiple job dependencies. Thanks skieffer and thomasmatecki for laying the groundwork for multi dependency support in RQ.
* Added `RoundRobinWorker` and `RandomWorker` classes to control how jobs are dequeued from multiple queues. Thanks bielcardona!
* Added `--serializer` option to `rq worker` CLI. Thanks f0cker!
* Added support for running asyncio tasks. Thanks MyrikLD!
* Added a new `STOPPED` job status so that you can differentiate between failed and manually stopped jobs. Thanks dralley!
* Fixed a serialization bug when used with job dependency feature. Thanks jtfidje!
* `clean_worker_registry()` now works in batches of 1,000 jobs to prevent modifying too many keys at once. Thanks AxeOfMen and TheSneak!
* Workers will now wait and try to reconnect in case of Redis connection errors. Thanks Asrst!

1.7.0

* Added `job.worker_name` attribute that tells you which worker is executing a job. Thanks selwin!
* Added `send_stop_job_command()` that tells a worker to stop executing a job. Thanks selwin!
* Added `JSONSerializer` as an alternative to the default `pickle` based serializer. Thanks JackBoreczky!
* Fixes `RQScheduler` running on Redis with `ssl=True`. Thanks BobReid!

1.6.1

* Worker now properly releases scheduler lock when run in burst mode. Thanks selwin!

1.6.0

* Workers now listen to external commands via pubsub. The first two features taking advantage of this infrastructure are `send_shutdown_command()` and `send_kill_horse_command()`. Thanks selwin!
* Added `job.last_heartbeat` property that's periodically updated when job is running. Thanks theambient!
* Now horses are killed by their parent group. This helps in cleanly killing all related processes if job uses multiprocessing. Thanks theambient!
* Fixed scheduler usage with Redis connections that uses custom parser classes. Thanks selwin!
* Scheduler now enqueue jobs in batches to prevent lock timeouts. Thanks nikkonrom!
* Scheduler now follows RQ worker's logging configuration. Thanks christopher-dG!

1.5.2

* Scheduler now uses the class of connection that's used. Thanks pacahon!
* Fixes a bug that puts retried jobs in `FailedJobRegistry`. Thanks selwin!
* Fixed a deprecated import. Thanks elmaghallawy!

1.5.1

* Fixes for Redis server version parsing. Thanks selwin!
* Retries can now be set through job decorator. Thanks nerok!
* Log messages below logging.ERROR is now sent to stdout. Thanks selwin!
* Better logger name for RQScheduler. Thanks atainter!
* Better handling of exceptions thrown by horses. Thanks theambient!

1.5.0

* Failed jobs can now be retried. Thanks selwin!
* Fixed scheduler on Python > 3.8.0. Thanks selwin!
* RQ is now aware of which version of Redis server it's running on. Thanks aparcar!
* RQ now uses `hset()` on redis-py >= 3.5.0. Thanks aparcar!
* Fix incorrect worker timeout calculation in SimpleWorker.execute_job(). Thanks davidmurray!
* Make horse handling logic more robust. Thanks wevsty!

1.4.3

* Added `job.get_position()` and `queue.get_job_position()`. Thanks aparcar!
* Longer TTLs for worker keys to prevent them from expiring inside the worker lifecycle. Thanks selwin!
* Long job args/kwargs are now truncated during logging. Thanks JhonnyBn!
* `job.requeue()` now returns the modified job. Thanks ericatkin!

1.4.2

* Reverted changes to `hmset` command which causes workers on Redis server < 4 to crash. Thanks selwin!
* Merged in more groundwork to enable jobs with multiple dependencies. Thanks thomasmatecki!

1.4.1

* Default serializer now uses `pickle.HIGHEST_PROTOCOL` for backward compatibility reasons. Thanks bbayles!
* Avoid deprecation warnings on redis-py >= 3.5.0. Thanks bbayles!

1.4.0

* Custom serializer is now supported. Thanks solababs!
* `delay()` now accepts `job_id` argument. Thanks grayshirt!
* Fixed a bug that may cause early termination of scheduled or requeued jobs. Thanks rmartin48!
* When a job is scheduled, always add queue name to a set containing active RQ queue names. Thanks mdawar!
* Added `--sentry-ca-certs` and `--sentry-debug` parameters to `rq worker` CLI. Thanks kichawa!
* Jobs cleaned up by `StartedJobRegistry` are given an exception info. Thanks selwin!
* Python 2.7 is no longer supported. Thanks selwin!

1.3.1

- Run `rqworker` with `--sentry_dsn=""` to disable Sentry integration. Thanks Bolayniuss!
- Support for `SSL` Redis kwarg. Thanks ajknv!
- `rqworker`and `rqscheduler` management commands now uses RQ's built in `setup_loghandlers` function. Thanks Paulius-Maruska!
- Remove the use of deprecated `admin_static` template tag. Thanks lorenzomorandini!

1.3.0

- Added support `redis-py` >= 3 and `RQ` >= 0.13. Thanks selwin!
- Use `Worker.count(queue=queue)` to speed up the process of getting the number of active workers. Thanks selwin!
- Added an option to requeue job from the admin interface. Thanks seiryuz!
- Improve Sentinel support. Thanks pnuckowski!

1.2.2

* `Job.fetch()` now properly handles unpickleable return values. Thanks selwin!

1.2.1

* `enqueue_at()` and `enqueue_in()` now sets job status to `scheduled`. Thanks coolhacker170597!
* Failed jobs data are now automatically expired by Redis. Thanks selwin!
* Fixes `RQScheduler` logging configuration. Thanks FlorianPerucki!

1.2.0

- Supports Python 3.7 by renaming `async` to `is_async`. Thanks Flimm!
- `UnpickleError` is now handled properly. Thanks selwin!
- Redis Sentinel support. Thanks SpeedyCoder!

1.1.0

- Fixed some admin related bugs. Thanks seiryuz!
- More Django 2.0 compatibility fixes. Thanks selwin and koddr!
- Custom `Job` and `Worker` classes are now supported. Thanks skirsdeda!
- `SENTRY_DSN` value in `settings.py` will now be used by default. Thanks inetss!

1.0.1

- Django 2.0 compatibility fixes.
- Minor bug fixes

1.0

Backward incompatible changes:

- `job.status` has been removed. Use `job.get_status()` and `job.set_status()` instead. Thanks selwin!

- `FailedQueue` has been replaced with `FailedJobRegistry`:
* `get_failed_queue()` function has been removed. Please use `FailedJobRegistry(queue=queue)` instead.
* `move_to_failed_queue()` has been removed.
* RQ now provides a mechanism to automatically cleanup failed jobs. By default, failed jobs are kept for 1 year.
* Thanks selwin!

- RQ's custom job exception handling mechanism has also changed slightly:
* RQ's default exception handling mechanism (moving jobs to `FailedJobRegistry`) can be disabled by doing `Worker(disable_default_exception_handler=True)`.
* Custom exception handlers are no longer executed in reverse order.
* Thanks selwin!

- `Worker` names are now randomized. Thanks selwin!

- `timeout` argument on `queue.enqueue()` has been deprecated in favor of `job_timeout`. Thanks selwin!

- Sentry integration has been reworked:
* RQ now uses the new [sentry-sdk](https://pypi.org/project/sentry-sdk/) in place of the deprecated [Raven](https://pypi.org/project/raven/) library
* RQ will look for the more explicit `RQ_SENTRY_DSN` environment variable instead of `SENTRY_DSN` before instantiating Sentry integration
* Thanks selwin!

- Fixed `Worker.total_working_time` accounting bug. Thanks selwin!

1.0.0

-   You can now view worker information
-   Detailed worker statistics such as failed/completed job count are
 now shown (requires RQ >= 0.9.0). Thanks seiryuz!
-   `rqstats` management command now allows you to monitor queue stats
 via CLI. Thanks seiryuz!
-   Added `/stats.json` endpoint to fetch RQ stats in JSON format,
 useful for monitoring purposes. Thanks seiryuz!
-   Fixed a crash when displaying deferring jobs. Thanks Hovercross!
-   Added `sentry-dsn` cli option to `rqworker` management command.
 Thanks efi-mk!
-   Improved performance when requeueing all jobs. Thanks
 therefromhere!

0.14.0

* Support for RQ 2.0. Thanks selwin!

0.13.1

* Support for RQ 1.14. Thanks HerrTxbias!
* Added `result_ttl` and `ttl` arguments to `scheduler.cron()`. Thanks marcelblijleven!

0.13.0

- Compatibility with Redis 3.0. Thanks dash-rai!
- Added `job_timeout` argument to `queue.enqueue()`. This argument will eventually replace `timeout` argument. Thanks selwin!
- Added `job_id` argument to `BaseDeathPenalty` class. Thanks loopbio!
- Fixed a bug which causes long running jobs to timeout under `SimpleWorker`. Thanks selwin!
- You can now override worker's name from config file. Thanks houqp!
- Horses will now return exit code 1 if they don't terminate properly (e.g when Redis connection is lost). Thanks selwin!
- Added `date_format` and `log_format` arguments to `Worker` and `rq worker` CLI. Thanks shikharsg!
Links

@pyup-bot pyup-bot mentioned this pull request Mar 22, 2025
@pyup-bot
Copy link
Copy Markdown
Collaborator Author

pyup-bot commented Apr 3, 2025

Closing this in favor of #865

@pyup-bot pyup-bot closed this Apr 3, 2025
@ednilson ednilson deleted the pyup-update-rq-0.12.0-to-2.2.0 branch April 3, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant