(channel, content, log=True)
| 7 | |
| 8 | |
| 9 | def emit_agent(channel, content, log=True): |
| 10 | try: |
| 11 | socketio.emit(channel, content) |
| 12 | if log: |
| 13 | logger.info(f"SOCKET {channel} MESSAGE: {content}") |
| 14 | return True |
| 15 | except Exception as e: |
| 16 | logger.error(f"SOCKET {channel} ERROR: {str(e)}") |
| 17 | return False |