pypi rq 3.0.0
v3.0

4 hours ago

New Features:

  • Added concurrency rate limits via queue.enqueue(func, rate_limit=RateLimit(...)). Thanks @selwin!
  • You can now configure RQ_KEY_PREFIX via environment variable, making it possible to run RQ on Redis Cluster. Thanks @dmonroy and @paltman!
  • Workers can now track multiple executions, exposed via worker.get_current_executions() and worker.current_execution_count. Thanks @selwin!
  • Added send_stop_execution_command() to stop a single execution of a job. Thanks @selwin!
  • Execution now stores its job ID. Thanks @selwin!
  • SpawnWorker now works with Unix sockets. Thanks @zhechen-cs!
  • RQ will now retry connecting to Redis on TimeoutError. Thanks @gotoUSA!
  • Officially support Python 3.15. Thanks @selwin!
  • rq worker-pool now supports --queue-class argument. Thanks @LindseyZ1205!
  • Worker now uses the more efficient client_info() instead of client_list() when available. Thanks @kylejn27!
  • Group.clean_registries() is now much more efficient. Thanks @kylejn27!

Breaking Changes:

  • SpawnWorker now uses os.posix_spawn() and requires POSIX. Thanks @selwin!
  • RQ now requires redis-py >= 5.0.1. Thanks @selwin!
  • CronScheduler now evaluates cron strings in local timezone instead of UTC (like system cron). Thanks @selwin!
  • Dependent jobs now pass through a new READY_TO_ENQUEUE status and ReadyJobRegistry before being enqueued. Thanks @selwin!
  • RQ now disables propagation on loggers it configures itself to prevent double logging when applications configure logging afterwards. Thanks @selwin!
  • Queue.enqueue_dependents() no longer accepts pipeline. Thanks @selwin!
  • job.cancel(enqueue_dependents=True, pipeline=pipeline) requires a watched pipeline and no longer enqueues dependents. Thanks @selwin!
  • rate_limit is now a reserved keyword argument of queue.enqueue(). Thanks @selwin!
  • Worker.perform_job(), handle_job_success(), monitor_work_horse() and maintain_heartbeats() now require an execution argument. Thanks @selwin!
  • Removed worker.set_current_job_id(), worker.current_job_working_time and worker.set_current_job_working_time(). Thanks @selwin!
  • Workers no longer store current_job in their Redis hash. Thanks @selwin!
  • worker.get_current_job_id() no longer accepts a pipeline argument. Thanks @selwin!
  • Job.execute_success_callback(), execute_failure_callback() and execute_stopped_callback() are replaced by functions of the same name in rq.callbacks. Thanks @selwin!
  • Failure callbacks and exception handlers invoked for abandoned jobs now receive None as the traceback. Thanks @selwin!
  • Job.perform() no longer removes the job key's TTL. Job key TTL changes are now handled by workers. Thanks @selwin!
  • get_current_job() now uses contextvars instead of thread-locals; gevent-based custom workers need greenlet >= 0.4.17. Thanks @selwin!

Bug Fixes:

  • Queue.get_job_ids() and Queue.get_jobs() now return an empty slice when length=0. Thanks @JackyHsu-X!
  • Job.delete() and Queue.empty() now also remove the deleted jobs' stored execution results. Thanks @MokiMeow!
  • enqueue_at() and enqueue_in() now honor unique=True. Thanks @jamalkamaladdin!
  • Job repeats are now scheduled against UTC instead of the local wall clock. Thanks @dylanpulver!
  • StartedJobRegistry.cleanup() no longer marks finished jobs as abandoned. Thanks @gyanu2507!
  • StartedJobRegistry.cleanup() now sends failed webhooks for abandoned jobs and no longer aborts when a failure callback raises. Thanks @selwin!
  • Event loops are now closed after coroutine jobs finish. Thanks @Kuang-xianxin!
  • You can now pass in Iterable to queue.enqueue_many(). Thanks @liuyinchu!
  • Fixed a bug where enqueue_at_front is not respected when job returns Retry result. Thanks @ericdelorefice!
  • at_front should be respected when enqueueing jobs with met dependencies during enqueue_many(). Thanks @ericdelorefice!
  • rq enqueue now properly handles --job-class argument. Thanks @LuisFigueroaG!
  • rq enqueue CLI command now properly handles --at-front when used in conjunction with --schedule-in. Thanks @ericdelorefice!
  • Fixed a bug where job result is not passed to success callbacks when jobs are synchronously with result_ttl=0. Thanks @nk-batman21!
  • Fixed at_front and result_ttl argument parsing when enqueueing a decorated function. Thanks @jipeng6036-del and @zhechen-cs!
  • Fixed a bug in repeat interval calculation when number of intervals is less than number of repeats. Thanks @zhechen-cs!
  • Fixed a bug where ttl is not expected when enqueueing a deferred job using enqueue_many(). Thanks @LindseyZ1205!
  • Fixed DST handling when a naive datetime is passed into enqueue_at(). Thanks @ericdelorefice!
  • enqueue_at() now respects pipeline argument. Thanks @LindseyZ1205!
  • Enqueuing a job with a Dependency(allow_failure=True) with an already failed dependency now works as expected. Thanks @LindseyZ1205!
  • worker.maintain_heartbeats() will no longer recreate a worker hash without TTL. Thanks @diegopasqualin-beyond!
  • queue.get_job_ids(length=0) now returns an empty list instead of all job IDs. Thanks @JackyHsu-X!
  • Fixed CronJob kwargs parsing. Thanks @LindseyZ1205!
  • Fixed a bug where workers may lose jobs while waiting for schedulers to stop. Thanks @laulauraluo!
  • SpawnWorker now works properly over SSL and Unix sockets. Thanks @LindseyZ1205 and @zhechen-cs!

Don't miss a new rq release

NewReleases is sending notifications on new releases.