-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use second db handle for only for user admin and writes (#1184)
* change 'user_engine' to a 'WriteSession' instead, so the master db connection is used for writes [and associated admin session reads] only * eager-load roles, remove unnecessary methods, add @default_session, move session ctx mgrs to admin page * make sure sql statements and timing are logged for all engines, plus tag engines with id and log those too, and superfluous user method cleanup * sqlalchemy cleanup: removed superfluous bits, improved argument passing for engine creation * _assign_roles() does its own commit() and returns an instance of the newly updated User * raise Exception when trying to update non-existent User, return UserRole on creation. * use more appropriate reciever for static method call, and expand comment on static vs bound methods in User.
- Loading branch information
1 parent
13fcfe3
commit 6fe6e7a
Showing
6 changed files
with
159 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.