Added SQLAlchemy
This commit is contained in:
@@ -4,6 +4,7 @@ import sentry_sdk
|
||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||
from flask import Flask
|
||||
|
||||
from model import db
|
||||
from utils import register_all_error_handlers, k8s
|
||||
|
||||
# import views
|
||||
@@ -24,10 +25,14 @@ if Config.SENTRY_DSN:
|
||||
app = Flask(__name__)
|
||||
app.config.from_object(Config)
|
||||
|
||||
# init stuffs
|
||||
k8s.init_app(app)
|
||||
|
||||
register_all_error_handlers(app)
|
||||
|
||||
@app.before_first_request
|
||||
def init_db():
|
||||
db.create_all()
|
||||
|
||||
# register views
|
||||
for view in [JobView]:
|
||||
view.register(app, trailing_slash=False)
|
||||
|
||||
Reference in New Issue
Block a user