@@ -10,6 +10,7 @@ import hashlib
|
||||
import logging
|
||||
import os
|
||||
import queue
|
||||
import random
|
||||
import socket
|
||||
import sys
|
||||
import threading
|
||||
@@ -43,6 +44,8 @@ GUI_SENDER_TIMEOUT_SECONDS = float(
|
||||
os.environ.get("JWEBOT_GUI_SENDER_TIMEOUT_SECONDS", "55")
|
||||
)
|
||||
GUI_SENDER_MAX_PAYLOAD_BYTES = 65536
|
||||
MULTI_REPLY_DELAY_MIN_SECONDS = 0.5
|
||||
MULTI_REPLY_DELAY_MAX_SECONDS = 1.0
|
||||
|
||||
BASE_WIDTH = 1440
|
||||
BASE_HEIGHT = 873
|
||||
@@ -1052,6 +1055,13 @@ def run() -> None:
|
||||
event_id=event_id,
|
||||
source=f"local-multi-{index}",
|
||||
)
|
||||
if index < len(texts):
|
||||
time.sleep(
|
||||
random.uniform(
|
||||
MULTI_REPLY_DELAY_MIN_SECONDS,
|
||||
MULTI_REPLY_DELAY_MAX_SECONDS,
|
||||
)
|
||||
)
|
||||
except Exception as error:
|
||||
logging.warning(
|
||||
"multi reply GUI delivery failed event_hash=%s error_type=%s",
|
||||
|
||||
Reference in New Issue
Block a user