diff --git a/queue_job/controllers/main.py b/queue_job/controllers/main.py index 936b7b1592..b1cd20d68a 100644 --- a/queue_job/controllers/main.py +++ b/queue_job/controllers/main.py @@ -30,6 +30,9 @@ def _try_perform_job(self, env, job): _logger.debug("%s started", job) job.perform() + # Triggers any stored computed fields before calling 'set_done' + # so that will be part of the 'exec_time' + env["base"].flush() job.set_done() job.store() env["base"].flush()