On 04/25/2018 03:55 PM, Patrick Uiterwijk wrote:
Any +1s?
From a4b55b290d475769c6cdb076d56fca762a0ed289 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Date: Wed, 25 Apr 2018 21:53:17 +0200
Subject: [PATCH] Make new-updates-sync always print status and email to
releng-cron
Signed-off-by: Patrick Uiterwijk <puiterwijk(a)redhat.com>
---
roles/bodhi2/backend/files/new-updates-sync | 7 +++++++
roles/bodhi2/backend/files/new-updates-sync.cron | 3 +++
roles/bodhi2/backend/tasks/main.yml | 6 ++----
3 files changed, 12 insertions(+), 4 deletions(-)
create mode 100644 roles/bodhi2/backend/files/new-updates-sync.cron
diff --git a/roles/bodhi2/backend/files/new-updates-sync
b/roles/bodhi2/backend/files/new-updates-sync
index de6dca78c..b90c89384 100755
--- a/roles/bodhi2/backend/files/new-updates-sync
+++ b/roles/bodhi2/backend/files/new-updates-sync
@@ -170,6 +170,7 @@ def sync_ostree(dst, ref):
if src_commit == dst_commit:
logger.info('OSTree at %s, ref %s in sync', dst, ref)
else:
+ print('Syncing ostree ref %s -> %s' % (ref, src_commit, dst_commit))
logger.info('Syncing OSTree to %s, ref %s: %s -> %s',
dst, ref, src_commit, dst_commit)
Could we not just piggyback off the logger.info statements rather than using
separate print statements?
Dusty