From 8c61a09e5b80de8bb89fe99cc9fcdadcbc1f285f Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 28 Jan 2025 16:30:30 +1100 Subject: [PATCH] fix: Add more logging for batch errors --- plugins/renewal.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/renewal.py b/plugins/renewal.py index 349fa8f..fe9b2d8 100644 --- a/plugins/renewal.py +++ b/plugins/renewal.py @@ -76,9 +76,9 @@ def main(params, authentication): responseContent = f'{{"method": "sendbatch","params":[ {batchTX} ]}}' response = requests.post(f'http://x:{api_key}@{ip}:12039', data=responseContent) if response.status_code != 200: - print("Failed to create batch") - print(f'Status code: {response.status_code}') - print(f'Response: {response.text}') + print("Failed to create batch",flush=True) + print(f'Status code: {response.status_code}',flush=True) + print(f'Response: {response.text}',flush=True) return {"status": "Failed", "transaction": "None"} batch = response.json() @@ -86,8 +86,8 @@ def main(params, authentication): print("Verifying tx...") if batch["error"]: if batch["error"] != "": - print("Failed to verify batch") - print(batch["error"]["message"]) + print("Failed to verify batch",flush=True) + print(batch["error"]["message"],flush=True) return {"status": "Failed", "transaction": "None"} if 'result' in batch: