From 04b7b49771afd698793a0ae09ddc763b0734248b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 12 2020 09:49:33 +0000 Subject: Include the date of the last mirroring process in the logs Basically, we show to the user the log of the last mirroring attempt but up until now the users had no idea when that attempt was. With this commit, they will have both the output of the attempt as well as the date and time of it. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/tasks_mirror.py b/pagure/lib/tasks_mirror.py index 24154ba..2757fee 100644 --- a/pagure/lib/tasks_mirror.py +++ b/pagure/lib/tasks_mirror.py @@ -11,6 +11,7 @@ from __future__ import unicode_literals, absolute_import import base64 +import datetime import logging import os import stat @@ -242,7 +243,8 @@ def mirror_project(self, session, username, namespace, name): error=True, env={"SSHKEY": private_key_file, "GIT_SSH": script_file}, ) - log = "Output from the push:\n stdout: %s\n stderr: %s" % ( + log = "Output from the push (%s):\n stdout: %s\n stderr: %s" % ( + datetime.datetime.utcnow().isoformat(), stdout, stderr, )