add error catch
This commit is contained in:
parent
864b96ea8e
commit
1ee64fd824
@ -44,9 +44,12 @@ def parse_logs(timeout):
|
|||||||
unsuccessful_attempts += 1
|
unsuccessful_attempts += 1
|
||||||
retry_info = data["message"].split("Retry ")[1].strip("()")
|
retry_info = data["message"].split("Retry ")[1].strip("()")
|
||||||
current_retry, max_retry = map(int, retry_info.split("/"))
|
current_retry, max_retry = map(int, retry_info.split("/"))
|
||||||
#if current_retry == max_retry:
|
if current_retry == max_retry:
|
||||||
# print(f"Max Retry Reached: {data}", flush=True)
|
print(f"Max Retry Reached: {data}", flush=True)
|
||||||
# return False, "Max Retry Reached"
|
return False, "Max Retry Reached"
|
||||||
|
elif data.get("message") == "Error getting latest open worker nonce on topic":
|
||||||
|
print(f"Error: {data}", flush=True)
|
||||||
|
return False, "Error getting latest open worker nonce on topic"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Exception occurred: {e}", flush=True)
|
print(f"Exception occurred: {e}", flush=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user