Speed up reconnects by caching state serialize (#93050)

This commit is contained in:
J. Nick Koston 2023-05-16 02:33:12 -05:00 committed by GitHub
parent 9c039a17ea
commit 99265a983a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 152 additions and 53 deletions

View file

@ -44,7 +44,7 @@ ENTITY_EVENT_REMOVE = "r"
ENTITY_EVENT_CHANGE = "c"
def result_message(iden: int, result: Any = None) -> dict[str, Any]:
def result_message(iden: JSON_TYPE | int, result: Any = None) -> dict[str, Any]:
"""Return a success result message."""
return {"id": iden, "type": const.TYPE_RESULT, "success": True, "result": result}