mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
fix: make sure we don't initialize the DB connector twice
This commit is contained in:
parent
779f6efdc4
commit
b1c9e0dc09
1 changed files with 2 additions and 1 deletions
|
|
@ -110,7 +110,8 @@ def create_db(myapp, cli=False, unittest=False, create=True, celery_worker=False
|
||||||
myapp.config["SQLALCHEMY_POOL_SIZE"] = 20
|
myapp.config["SQLALCHEMY_POOL_SIZE"] = 20
|
||||||
myapp.config["SQLALCHEMY_POOL_RECYCLE"] = 600
|
myapp.config["SQLALCHEMY_POOL_RECYCLE"] = 600
|
||||||
|
|
||||||
db.init_app(myapp)
|
if "sqlalchemy" not in myapp.extensions:
|
||||||
|
db.init_app(myapp)
|
||||||
if not cli and not unittest and not celery_worker: # pragma: no cover
|
if not cli and not unittest and not celery_worker: # pragma: no cover
|
||||||
with myapp.app_context():
|
with myapp.app_context():
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue