Merge pull request #69 from fti7/debug-info

add reply debug logging
This commit is contained in:
TC² 2024-07-22 15:37:00 -04:00 committed by GitHub
commit 33020e8ec5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,12 +16,18 @@ def send_message(message, destination, interface):
max_payload_size = 200 max_payload_size = 200
for i in range(0, len(message), max_payload_size): for i in range(0, len(message), max_payload_size):
chunk = message[i:i + max_payload_size] chunk = message[i:i + max_payload_size]
interface.sendText( try:
text=chunk, d = interface.sendText(
destinationId=destination, text=chunk,
wantAck=False, destinationId=destination,
wantResponse=False wantAck=False,
) wantResponse=False
)
logging.info(f"REPLY SEND ID={d.id}")
except Exception as e:
logging.info(f"REPLY SEND ERROR {e.message}")
time.sleep(2) time.sleep(2)