DataDog / dd-trace-py

Datadog Python APM Client
https://ddtrace.readthedocs.io/
Other
552 stars 416 forks source link

fix(rq): handle new Job.get_status() exception #11512

Open fancyweb opened 11 hours ago

fancyweb commented 11 hours ago

Fixes https://github.com/DataDog/dd-trace-py/issues/7985 again with rq 2.0.0.

rq 2.0.0 has been released about four weeks ago.

Since https://github.com/rq/rq/pull/2039, Job.get_status() doesn't return None but raises InvalidJobOperation when refresh=True (which is the default behavior).

The proposed change is retro-compatible with previous supported versions.

I manually bumped rq latest to 2.0.0 since it's currently untested.

Checklist

Reviewer Checklist