Skip to content

Commit

Permalink
fix(daemons/audit.py): adding error handling on audit function (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
odarotto authored Nov 6, 2024
1 parent 3270adf commit 82398c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion workflow/daemons/audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import click
from click_params import JSON, URL, FirstOf
from requests import HTTPError

from workflow import DEFAULT_WORKSPACE_PATH
from workflow.http.context import HTTPContext
Expand Down Expand Up @@ -69,6 +70,10 @@ def audit(
if test_mode:
return http.buckets.audit()
while True:
response = http.buckets.audit()
try:
response = http.buckets.audit()
except HTTPError as error:
logger.error(error)
response = {}
logger.info(response)
time.sleep(sleep)

0 comments on commit 82398c8

Please sign in to comment.