Skip to content

Commit

Permalink
Merge pull request #1 from CapsuleHealth/dev
Browse files Browse the repository at this point in the history
Added warning threshold conditions
  • Loading branch information
Tony Yun authored Mar 23, 2021
2 parents 5d51f4a + a540ea7 commit d86683f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hamb/sql_comp_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def __init__(self, test_conf):
self.conn_b = self.test_conf["conn_b"]
print(f"conn_a: {self.conn_a}")
print(f"conn_b: {self.conn_b}")
self.warning_threshold = self.test_conf["warning_threshold"]
self.failure_threshold = self.test_conf["failure_threshold"]
self.aws_access_key = None
self.aws_secret_key = None

Expand Down Expand Up @@ -121,10 +123,12 @@ def run(self):

diff = list(set(result_a).symmetric_difference(set(result_b)))

if diff:
if len(diff) > self.failure_threshold:
status = "failure"
elif len(diff) > self.warning_threshold:
status = "warning"
else:
diff = None
# diff = None
status = "success"

detail = {
Expand Down

0 comments on commit d86683f

Please sign in to comment.