(self, message: str | bytes)
| 485 | self.send(message=message) |
| 486 | |
| 487 | async def on_message(self, message: str | bytes): |
| 488 | try: |
| 489 | data = json.loads(message) |
| 490 | match data["type"]: |
| 491 | case "flows/updateFilter": |
| 492 | self.update_filter(data["payload"]["name"], data["payload"]["expr"]) |
| 493 | case other: |
| 494 | raise ValueError(f"Unsupported command: {other}") |
| 495 | except Exception as e: |
| 496 | logger.error(f"Error processing message from {self}: {e}") |
| 497 | self.close(code=1011, reason="Internal server error.") |
| 498 | |
| 499 | |
| 500 | class Flows(RequestHandler): |
nothing calls this directly
no test coverage detected