This commit is contained in:
flaskfarm
2022-10-12 15:40:54 +09:00
parent 250cc5084f
commit ba1808fd3f
7 changed files with 67 additions and 38 deletions

View File

@@ -213,9 +213,11 @@ class PluginManager:
# import가 끝나면 DB를 만든다.
# 플러그인 로드시 DB 초기화를 할 수 있다.
if not F.config['run_celery']:
try:
F.db.create_all()
try:
with F.app.app_context():
F.db.create_all()
except Exception as exception:
F.logger.error('Exception:%s', exception)
F.logger.error(traceback.format_exc())