Open drc38 opened 3 months ago
Confirmed replacing the calls (eg the below example) fixes the blocking error:
await asyncio.get_event_loop().run_in_executor(
None,
validate_payload,
msg,
self._ocpp_version
)
Let me know if you want me to submit a PR
Confirmed replacing the calls (eg the below example) fixes the blocking error:
await asyncio.get_event_loop().run_in_executor( None, validate_payload, msg, self._ocpp_version )
Let me know if you want me to submit a PR
I don't really know how the process works, but maybe you should submit PR...
The ocpp integration (https://github.com/lbbrhzn/ocpp) using this library in Home Assistant 2024.06 has detected that the IO
open
file call inmessages.py
blocks the event loop.Would it make sense in
charge_point.py
to replace calls tovalidate_payload
with the equivalent run in the executor egawait asyncio.get_event_loop().run_in_executor(...,validate_payload,...)
?Or if you have suggestions on how it can be addressed another way that would be great.
Many thanks