feat: add ACK mechanism for WS execute_js + timeout diagnostics
- TMWebDriver: add self.acks dict, HTTP implicit ACK on longpoll dequeue, WS explicit ACK handler, enhanced timeout diagnostics (4 cases)
- Fix: data.get('type') in 'result' -> == 'result'
- JS userscript: send ACK on script receive
- tgapp: fix proxy URL prefix
- mykey_template: add tg/proxy fields
This commit is contained in:
5
tgapp.py
5
tgapp.py
@@ -89,10 +89,9 @@ if __name__ == '__main__':
|
||||
try:
|
||||
_lock_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM); _lock_sock.bind(('127.0.0.1', 19527))
|
||||
except OSError: sys.exit('Another instance is already running.')
|
||||
if not ALLOWED:
|
||||
sys.exit('ERROR: tg_allowed_users in mykey.py is empty or missing. Set it to avoid unauthorized access.')
|
||||
if not ALLOWED: sys.exit('ERROR: tg_allowed_users in mykey.py is empty or missing. Set it to avoid unauthorized access.')
|
||||
threading.Thread(target=agent.run, daemon=True).start()
|
||||
proxy = vars(mykey).get('proxy', '127.0.0.1:2082')
|
||||
proxy = vars(mykey).get('proxy', 'http://127.0.0.1:2082')
|
||||
app = ApplicationBuilder().token(mykey.tg_bot_token).proxy(proxy).get_updates_proxy(proxy).build()
|
||||
app.add_handler(CommandHandler("stop", cmd_abort))
|
||||
app.add_handler(CommandHandler("llm", cmd_llm))
|
||||
|
||||
Reference in New Issue
Block a user