We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ef32d2 commit 07b7649Copy full SHA for 07b7649
pyhilo/util/state.py
@@ -114,5 +114,9 @@ async def set_state(
114
new_state: dict[str, Any] = {**current_state, **merged_state}
115
async with aiofiles.open(state_yaml, mode="w") as yaml_file:
116
LOG.debug("Saving state to yaml file")
117
+ # TODO: Use asyncio.get_running_loop() and run_in_executor to write
118
+ # to the file in a non blocking manner. Currently, the file writes
119
+ # are properly async but the yaml dump is done synchroniously on the
120
+ # main event loop.
121
content = yaml.dump(new_state)
122
await yaml_file.write(content)
0 commit comments