Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
zabbix: remove a build when it reaches complete state correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Oct 25, 2016
1 parent 24af9a6 commit 130340e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zabbix_metrics_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ def run(zabbix_host, osbs_master, config, instance):
pending_duration = build.started_time - build.created_time
_send_zabbix_message(zabbix_host, osbs_master, "pending", pending_duration)
running_builds.add(build_name)
elif status in ['Running', 'Complete', 'Failed'] and changeset == 'deleted':
elif (status in ['Running'] and changeset == 'deleted')\
or (status in ['Complete', 'Failed', 'Cancelled']):
try:
running_builds.remove(build_name)
except Exception as e:
Expand Down

0 comments on commit 130340e

Please sign in to comment.