diff --git a/queue_job/controllers/main.py b/queue_job/controllers/main.py index 936b7b1592..b044f9fbef 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"].with_user(job.user_id).flush() job.set_done() job.store() env["base"].flush()