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
[x] PR author has checked that all the criteria below are met
The PR description includes an overview of the change
The PR description articulates the motivation for the change
The change includes tests OR the PR description describes a testing strategy
The PR description notes risks associated with the change, if any
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 returnNone
but raisesInvalidJobOperation
whenrefresh=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