peewee-async icon indicating copy to clipboard operation
peewee-async copied to clipboard

[QUESTION] Are there any particular reasons why swap_database feature is experimental?

Open jianingy opened this issue 7 years ago • 3 comments

Hi,

We are trying to use 'swap_database' feature for using master/slave database on the fly. There is an 'experimental warning' in the code, however, we've done some tests (including concurrent tests) without any problems. Therefore, may I ask why this is an experimental feature (any considerations about peewee changes?).

P.S. We use peewee_async with Tornado 5.1

Thanks for your reply.

jianingy avatar Jul 23 '18 15:07 jianingy

Hi @jianingy! Initially I developed this feature for testing and it wasn't intended for production. As for current state, I think we may need more explicit interface, maybe like .select(using=database) as in Django.

rudyryk avatar Aug 05 '18 21:08 rudyryk

Hi @rudyryk ! Thanks for the reply. It would be great to have a feature like .select(using=database). and I think it would be even better if we have a ProxyDatabase just like peewees' but with database switching feature. Anyway, 'swap_database' works fine currently. Thanks for this great project and looking forward to the 0.6.0 release. :)

jianingy avatar Aug 09 '18 02:08 jianingy

@jianingy You can try 0.6 pre-release right now, just use --pre flag for pip, like that pip install --pre peewee-async. Also specifying peewee-async>=0.6.0a0 should also work I believe. I'm publishing it as pre-release to prevent unexpected build breaks in the meantime. :)

rudyryk avatar Aug 09 '18 08:08 rudyryk