supakeen / pinnwand

A Python pastebin that tries to keep it simple.
MIT License
181 stars 43 forks source link

Use async db driver #272

Open shtlrs opened 3 months ago

shtlrs commented 3 months ago

It'd be ideal to use an async driver to fetch data from the database, that'll work well with the async coroutines of tornado's handlerS.

supakeen commented 3 months ago

It would, and sqlachemy nowadays can do asynchronous stuff as well (it didn't when the models were written in pinnwand).

shtlrs commented 3 months ago

The main issue i see with this is click.

Since it does not offer async support, we'd basically need to have to sort of packages for db related stuff, one sync and one async It is either that or we will need to write some wrapper for click that it will enable it to run in an asynchronous context.

supakeen commented 3 months ago

What is the issue you see with click? It's only involved before we actually start an event loop right?