mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Comments about sqlite: take mysql into account too
This commit is contained in:
@@ -145,8 +145,11 @@ DATABASES = {
|
||||
|
||||
DATABASE_ROUTERS = ("bugsink.dbrouters.SeparateSnappeaDBRouter",)
|
||||
|
||||
# This is the default, but we're being explicit. In our setup (sqlite) we assume a low cost for reconnecting to the DB,
|
||||
# but a potential high cost ("checkpoint starvation") for keeping connections open.
|
||||
# This is the default, but we're being explicit. In our recommended setup (sqlite) we assume a low cost for reconnecting
|
||||
# to the DB, but a potential high cost ("checkpoint starvation") for keeping connections open.
|
||||
#
|
||||
# For not-as-recommended setups (mysql) we're OK with "one connection per request" too, even though the arguments laid
|
||||
# out in the above don't apply as much. (This might change after research)
|
||||
CONN_MAX_AGE = 0
|
||||
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ logger = logging.getLogger("bugsink")
|
||||
|
||||
|
||||
def set_wal_pragma(apps, schema_editor):
|
||||
# even though we're currently on "sqlite only", we take the forward-looking approach of at least having the escape
|
||||
# hatch for other DBs:
|
||||
# for non-sqlite (i.e. mysql) databases, this set is simply skipped.
|
||||
if not schema_editor.connection.vendor == 'sqlite':
|
||||
logger.info('\n Migration info: Database vendor: {}'.format(schema_editor.connection.vendor))
|
||||
logger.info(' Migration info: Skipping set_wal migration')
|
||||
|
||||
Reference in New Issue
Block a user