From e8803983ba792822cf90fc80bbd50fcfa071d255 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sun, 14 Jun 2015 23:08:21 +0200 Subject: reproducible: remote_scheduler: fix notification logic --- bin/reproducible_remote_scheduler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3-54-g00ecf