bag_of_holding: move persistence to async - #4222
Conversation
Automated PR Review0. Summary
Moves No further comments, nice job 👍 Generated by PR Review Bot. This is advisory, a human reviewer must still approve. |
| except Exception: | ||
| logger.exception("Failed to persist database") | ||
| _pending.handle = asyncio.get_running_loop().call_later(FLUSH_INTERVAL, _flush) | ||
| db_dirty.set() |
There was a problem hiding this comment.
just to be sure.. how are we supposed to know that the write operation failed ?
There was a problem hiding this comment.
The pint here is that: It failed to write in disk, we still return success.
There was a problem hiding this comment.
We should put the write_db logic inside flush, to raise any issues when writing to disk.
as discussed in #4180 (comment)