Add field with time of last progress updating to task result dictionary
ramusus opened this issue · 3 comments
I'm thinking It might be useful to understand what is last time of response from worker.
For example:
self.update_state(None, PROGRESS, {
"progress_percent": progress_percent,
"time_remaining": time_remaining,
"time_feedback": datetime.now(),
})
If workers accidentaly restarts, as result you will have tasks started with some already defined porgress. But it's hard to understand If any workers are processing them now or they should be assumed as died. I suppose last feedback time may help to understand if task is alive.
What do you think about this idea?
Hi ramusus,
I think that's an excellent idea. Implementing it would be fairly lightweight and it would definitely be useful from the client's perspective.
As far as a name, how about last_progress_update
and it be a unix timestamp? Javascript has an easier time dealing with those.
-Wes
Can't find the last_progress_update
in the code. Should this be using the on_heartbeat
event described here?
Hello gthieleb,
This was a proposed enhancement that was never implemented, so you won't find it in the codebase. I'd love to see it in a pull request, though!
-Wes