05bit / peewee-async

Asynchronous interface for peewee ORM powered by asyncio
http://peewee-async-lib.readthedocs.io
MIT License
733 stars 100 forks source link

RetryOperationalError #120

Open thelink2012 opened 5 years ago

thelink2012 commented 5 years ago

Is there any way to replicate RetryOperationalError of peewee in peewee_async?

I have tried inheriting from RetryOperationalError and overriding execute (closing and retrying on error), but that does not quite work, specially for transactions. For reference, what peewee does is override execute_sql and retries on error.

Thank you in advanced.

futursolo commented 4 years ago

+1. This is extremely useful when using peewee-async serverless applications.