@@ -509,11 +509,18 @@ def main():
|
||||
|
||||
for line in sys.stdin:
|
||||
try:
|
||||
request = json.loads(line.strip())
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
request = json.loads(line)
|
||||
command = request.get("command")
|
||||
data = request.get("data", {})
|
||||
request_id = request.get("requestId", "")
|
||||
|
||||
# Debug logging
|
||||
print(f"DEBUG - Processing command: {command} with ID: {request_id}", file=sys.stderr, flush=True)
|
||||
|
||||
if command:
|
||||
result = dispatch_command(command, **data)
|
||||
response = {
|
||||
@@ -521,6 +528,7 @@ def main():
|
||||
"data": result,
|
||||
"requestId": request_id
|
||||
}
|
||||
print(f"DEBUG - Command {command} completed successfully", file=sys.stderr, flush=True)
|
||||
else:
|
||||
response = {
|
||||
"success": False,
|
||||
@@ -531,6 +539,8 @@ def main():
|
||||
print(json.dumps(response), flush=True)
|
||||
|
||||
except Exception as e:
|
||||
print(f"ERROR - Exception in main loop: {str(e)}", file=sys.stderr, flush=True)
|
||||
print(f"ERROR - Traceback: {traceback.format_exc()}", file=sys.stderr, flush=True)
|
||||
error_response = {
|
||||
"success": False,
|
||||
"error": str(e),
|
||||
|
||||
Referencia en una nueva incidencia
Block a user