diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-12-02 14:10:01 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-09 11:28:32 +0100 |
commit | d5ac801b0f9ae629b9468309011785271acb717c (patch) | |
tree | b0facce780890c6c8bf282900bf98e66052efce4 | |
parent | 1b48cc5b25823b962b975423c7ae2928fcc9e583 (diff) | |
download | jenkins.debian.net-d5ac801b0f9ae629b9468309011785271acb717c.tar.xz |
reproducible: remote_scheduler: refactor the notification level chooser
-rwxr-xr-x | bin/reproducible_remote_scheduler.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py index 4181ac5f..756aa4b1 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)) |