From d5e55ab95a9d22978963ec5b19509380559b654a Mon Sep 17 00:00:00 2001 From: Jack Kinsella Date: Sun, 25 Aug 2024 15:39:29 +0200 Subject: [PATCH] Log job success (#2118) * Log job success * Format with black --- rq/worker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rq/worker.py b/rq/worker.py index 91c204bc..f5a41c17 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -1498,6 +1498,12 @@ class Worker(BaseWorker): # self.execution.delete(pipeline) # type: ignore pipeline.execute() + + time_taken = job.ended_at - job.started_at + self.log.info( + 'Successfully completed %s job in %ss on worker %s', job.description, time_taken, self.name + ) + self.log.debug('Finished handling successful execution of job %s', job.id) break except redis.exceptions.WatchError: