db config
This commit is contained in:
parent
097a4bff51
commit
9a77c1a36f
|
|
@ -19,6 +19,8 @@ def get_db_connection():
|
|||
if not hasattr(_local_storage, 'connection'):
|
||||
_local_storage.connection = sqlite3.connect(profits_database, check_same_thread=False)
|
||||
_local_storage.connection.row_factory = sqlite3.Row
|
||||
_local_storage.connection.execute("PRAGMA journal_mode=WAL")
|
||||
_local_storage.connection.execute("PRAGMA synchronous=NORMAL")
|
||||
_local_storage.created_at = current_time
|
||||
|
||||
return _local_storage.connection
|
||||
|
|
|
|||
Loading…
Reference in New Issue