[Qa-jenkins-scm] [jenkins.debian.net] 09/10: reproducible: remote_scheduler: refactor the notification level chooser

Holger Levsen holger at moszumanska.debian.org
Mon Dec 7 19:56:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch to_be_deployed_after_this_week
in repository jenkins.debian.net.

commit 02f0df2a99dcfb4e91a87490acb4f870a79cdf7d
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Wed Dec 2 14:10:01 2015 +0000

    reproducible: remote_scheduler: refactor the notification level chooser
---
 bin/reproducible_remote_scheduler.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index 4181ac5..756aa4b 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -232,12 +232,16 @@ if amount + len(ids) > 200 and not local:
 # do the actual scheduling
 to_schedule = []
 save_schedule = []
-notify = 1 if notify else 0
-notify = 2 if notify_on_start else 0
 artifacts_value = 1 if artifacts else 0
 reason = reason if reason else None
+if notify_on_start:
+    do_notify = 2
+elif notify:
+    do_notify = 1
+else:
+    do_notify = 0
 for id in ids:
-    to_schedule.append((id, date, artifacts_value, str(notify), requester,
+    to_schedule.append((id, date, artifacts_value, str(do_notify), requester,
                         reason))
     save_schedule.append((id, requester, epoch))
 log.debug('Packages about to be scheduled: ' + str(to_schedule))

-- 
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