There was an error while loading. Please reload this page.
1 parent 5342e6d commit a2d4a53Copy full SHA for a2d4a53
2 files changed
mrq/job.py
@@ -207,8 +207,11 @@ def save_status(
207
updates["queue"] = queue
208
if get_current_config().get("trace_greenlets"):
209
current_greenlet = gevent.getcurrent()
210
- updates["time"] = current_greenlet._trace_time
211
- updates["switches"] = current_greenlet._trace_switches
+
+ # TODO are we sure the current job is doing the save_status() on itself?
212
+ if hasattr(current_greenlet, "_trace_time"):
213
+ updates["time"] = current_greenlet._trace_time
214
+ updates["switches"] = current_greenlet._trace_switches
215
216
if exception:
217
trace = traceback.format_exc()
mrq/version.py
@@ -1 +1 @@
1
-VERSION = "0.1.4"
+VERSION = "0.1.5"
0 commit comments