From 2b6025e67d5d1bc53608ea29164c8e12031e7fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A1n=20I=2E=20Del=20Valle?= Date: Wed, 27 May 2020 12:45:53 -0700 Subject: [PATCH] Checking previously ignored error which caused issues. (#123) Error in monitor was going unchecked which caused some issues when the monitor timed out. --- monitors.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monitors.go b/monitors.go index 575e177..d3de726 100644 --- a/monitors.go +++ b/monitors.go @@ -78,8 +78,11 @@ func (m *Monitor) JobUpdateStatus(updateKey aurora.JobUpdateKey, UpdateStatuses: desiredStatuses, } summary, err := m.JobUpdateQuery(updateQ, interval, timeout) + if err != nil { + return 0, err + } - return summary[0].State.Status, err + return summary[0].State.Status, nil } // JobUpdateQuery polls the scheduler every certain amount of time to see if the query call returns any results.