summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-06-14 23:08:21 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-14 23:14:36 +0200
commite8803983ba792822cf90fc80bbd50fcfa071d255 (patch)
tree457b5d9d4390fd2fe1a904050510e47703199d01
parentccb026bd450966722d5526f9496a408de2dbd5eb (diff)
downloadjenkins.debian.net-e8803983ba792822cf90fc80bbd50fcfa071d255.tar.xz
reproducible: remote_scheduler: fix notification logic
-rwxr-xr-xbin/reproducible_remote_scheduler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index cd5845ca..d8ece34f 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -67,6 +67,7 @@ artifacts = scheduling_args.artifacts
notify = not scheduling_args.no_notify # note the notify vs no-notify
log.debug('Requester: ' + requester)
+log.debug('Local call: ' + str(local))
log.debug('Reason: ' + reason)
log.debug('Artifacts: ' + str(artifacts))
log.debug('Notify: ' + str(notify))
@@ -164,6 +165,7 @@ if amount + len(ids) > 50 and not local:
# do the actual scheduling
to_schedule = []
save_schedule = []
+notify = '' if not notify else notify
for id in ids:
artifacts_value = 1 if artifacts else 0
to_schedule.append((id, date, artifacts_value, str(notify).lower(), requester))
@@ -182,7 +184,7 @@ cursor.executemany(query2, save_schedule)
conn_db.commit()
log.info(bcolors.GOOD + message + bcolors.ENDC)
-if requester != "jenkins maintenance job" and not local:
+if not (local and requester == "jenkins maintenance job"):
irc_msg(message)
generate_schedule() # the html page