one sqlalchemy session per thread
This commit is contained in:
parent
0c08d37c56
commit
8b46a85d56
15 changed files with 140 additions and 102 deletions
|
|
@ -11,3 +11,6 @@ def user():
|
|||
import settings
|
||||
import user.models
|
||||
return user.models.User.get_or_create(settings.USER_ID)
|
||||
|
||||
from threading import local
|
||||
db = local()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue