django_rq is installed in the environment and was previously running fine. It now refuses to run and crashes workers/prevents redis connection because it is trying to use use_connection. I found on another bug review that it is because use_connection is now depreciated. What is the workaround to this?
Requirements.txt:
ipython==7.16.3 Django==3.1.7 django-render-partial==0.4 libsasscompiler==0.1.8 Markdown==3.3.4 django-phonenumber-field==5.0.0 phonenumbers==8.12.9 whitenoise==5.0.1 honcho==1.0.1 psycopg2-binary==2.8.5 dj-database-url==0.5.0 gunicorn==20.0.4 dj-database-url==0.5.0 django-phonenumber-field==5.0.0 django-filter==2.4.0 pandas==1.1.5 boto3==1.18.23 django-storages==1.11.1 Pillow==8.3.1 djangorestframework==3.12.4 django-select2==7.7.3 django-redis==5.0.0 django-localflavor==3.1 django-memoize==2.3.1 django-rq==2.4.1 requests==2.26.0 django-polymorphic==3.0.0 bs4==0.0.1 curlify==2.2.1 numpy==1.19.5
Traceback (most recent call last):
22:07:49 default_worker.1 | File "manage.py", line 22, in <module>
22:07:49 default_worker.1 | main()
22:07:49 default_worker.1 | File "manage.py", line 18, in main
22:07:49 default_worker.1 | execute_from_command_line(sys.argv)
22:07:49 default_worker.1 | File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
22:07:49 default_worker.1 | utility.execute()
22:07:49 default_worker.1 | File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 395, in execute
22:07:49 default_worker.1 | self.fetch_command(subcommand).run_from_argv(self.argv)
22:07:49 default_worker.1 | File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 244, in fetch_command
22:07:49 default_worker.1 | klass = load_command_class(app_name, subcommand)
22:07:49 default_worker.1 | File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 37, in load_command_class
22:07:49 default_worker.1 | module = import_module('%s.management.commands.%s' % (app_name, name))
22:07:49 default_worker.1 | File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
22:07:49 default_worker.1 | return _bootstrap._gcd_import(name[level:], package, level)
22:07:49 default_worker.1 | File "<frozen importlib._bootstrap>", line 994, in _gcd_import
22:07:49 default_worker.1 | File "<frozen importlib._bootstrap>", line 971, in _find_and_load
22:07:49 default_worker.1 | File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
22:07:49 default_worker.1 | File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
22:07:49 default_worker.1 | File "<frozen importlib._bootstrap_external>", line 678, in exec_module
22:07:49 default_worker.1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
22:07:49 default_worker.1 | File "/usr/local/lib/python3.6/dist-packages/django_rq/management/commands/rqworker.py", line 6, in <module>
22:07:49 default_worker.1 | from rq import use_connection
22:07:49 default_worker.1 | ImportError: cannot import name 'use_connection'
22:07:49 system | default_worker.1 stopped (rc=1)
django_rq is installed in the environment and was previously running fine. It now refuses to run and crashes workers/prevents redis connection because it is trying to use use_connection. I found on another bug review that it is because use_connection is now depreciated. What is the workaround to this? Requirements.txt:
ipython==7.16.3 Django==3.1.7 django-render-partial==0.4 libsasscompiler==0.1.8 Markdown==3.3.4 django-phonenumber-field==5.0.0 phonenumbers==8.12.9 whitenoise==5.0.1 honcho==1.0.1 psycopg2-binary==2.8.5 dj-database-url==0.5.0 gunicorn==20.0.4 dj-database-url==0.5.0 django-phonenumber-field==5.0.0 django-filter==2.4.0 pandas==1.1.5 boto3==1.18.23 django-storages==1.11.1 Pillow==8.3.1 djangorestframework==3.12.4 django-select2==7.7.3 django-redis==5.0.0 django-localflavor==3.1 django-memoize==2.3.1 django-rq==2.4.1 requests==2.26.0 django-polymorphic==3.0.0 bs4==0.0.1 curlify==2.2.1 numpy==1.19.5