[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: remote_scheduler: fix notification logic
Holger Levsen
holger at moszumanska.debian.org
Sun Jun 14 21:15:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit e8803983ba792822cf90fc80bbd50fcfa071d255
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Sun Jun 14 23:08:21 2015 +0200
reproducible: remote_scheduler: fix notification logic
---
bin/reproducible_remote_scheduler.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index cd5845c..d8ece34 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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list