Database(autoconnect=True) is not thread-safe
By default peewee databases use a connection-per-thread.
In `Database.cursor`, `self.connect()` may be attempted by multiple threads and even though the first one will create the connection, all others will get an `OperationalError` due to `connect(reuse_if_open=False)`.

I'm not familiar enough with the code to say that this is the only place where `reuse_if_open` should be `True`.