rq / django-rq

A simple app that provides django integration for RQ (Redis Queue)
MIT License
1.81k stars 286 forks source link

RQ 1.14.0 breaks django-rq (use_connection) #592

Closed orokusaki closed 1 year ago

orokusaki commented 1 year ago

Hey @selwin, et al,

rq==1.14.0 breaks django-rq==2.7.0, due to the importation / use of the previously-deprecated, now-removed use_connection.

I stumbled this old note in the 1.13 ~ 1.14 diff about using the Connection context manager, in lieu of the use_connection function, and then landed on the current docs about connections, and I thought it'd be best to make an issue here for discussion, before attempting to make a patch for this.

  1. is the approach in the aforementioned docs up to date and fully relevant? a. would you accept a patch to update this module to reflect that? b. do you recommend any other changes to go along with this?
  2. are there other changes you know of that would be required, in order to support rq==1.14.0?
selwin commented 1 year ago

@orokusaki thanks for catching this.

  1. Do you mind making a PR to change use_connection to the Connection context manager?
  2. No, as far as I know there's no other breaking changes. Thanks!
selwin commented 1 year ago

Actually there's already a draft PR for this. https://github.com/rq/django-rq/pull/583/files

orokusaki commented 1 year ago

@selwin - that's excellent news - I just got back in front of my screen. Let me know if you need any more help with anything else, or changes to the approach in that PR, and I'll make a PR.

selwin commented 1 year ago

I think that PR is good to do. I'll merge and make an emergency release.

grumpyp commented 1 year ago

Hey, what's missing here? Is there already a workaround?

selwin commented 1 year ago

This was already fixed in version 2.8.0 released a few days ago. https://pypi.org/project/django-rq/2.8.0/