mdawar / rq-exporter

Prometheus metrics exporter for Python RQ (Redis Queue).
MIT License
66 stars 29 forks source link

rq 2.0.0 breaks compatibility with rq-exporter #37

Closed dereckson closed 1 week ago

dereckson commented 1 week ago

When running rq-exporter with rq 2.0.0:

Traceback (most recent call last):
  File "/app/.venv/bin/rq-exporter", line 5, in <module>
    from rq_exporter.main import main
  File "/app/.venv/lib/python3.10/site-packages/rq_exporter/init.py", line 6, in <module>
    from .exporter import create_app
  File "/app/.venv/lib/python3.10/site-packages/rq_exporter/exporter.py", line 14, in <module>
    from .collector import RQCollector
  File "/app/.venv/lib/python3.10/site-packages/rq_exporter/collector.py", line 8, in <module>
    from rq import Connection
ImportError: cannot import name 'Connection' from 'rq' (/app/.venv/lib/python3.10/site-packages/rq/init.py)

Other libraries needed some changes, for example rq-dashboard: https://github.com/Parallels/rq-dashboard/commit/780ec24c94d99a0613e8c658478c40433472581e