Send message in a thread.
(msg, session_id, result_queue)
| 57 | sock.close() |
| 58 | |
| 59 | def send_message_async(msg, session_id, result_queue): |
| 60 | """Send message in a thread.""" |
| 61 | sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) |
| 62 | try: |
| 63 | sock.connect(SOCKET_PATH) |
| 64 | ok, output = send_cmd_blocking(sock, f"message:{msg}", session_id, timeout=180) |
| 65 | result_queue.put((ok, output)) |
| 66 | except Exception as e: |
| 67 | result_queue.put((False, str(e))) |
| 68 | finally: |
| 69 | sock.close() |
| 70 | |
| 71 | def create_test_session(cwd="/tmp"): |
| 72 | """Create a headless test session.""" |
nothing calls this directly
no test coverage detected