Lint black
This commit is contained in:
@@ -136,7 +136,9 @@ def init_db(app: Flask) -> None:
|
|||||||
db.session.commit() # pylint: disable=no-member
|
db.session.commit() # pylint: disable=no-member
|
||||||
rmtree(Path("./results"), ignore_errors=True) # Clear results folder
|
rmtree(Path("./results"), ignore_errors=True) # Clear results folder
|
||||||
|
|
||||||
if not db.engine.dialect.has_table(db.engine.connect(), "image"): # If not configured
|
if not db.engine.dialect.has_table(
|
||||||
|
db.engine.connect(), "image"
|
||||||
|
): # If not configured
|
||||||
db.create_all()
|
db.create_all()
|
||||||
print("Database structure created successfully.")
|
print("Database structure created successfully.")
|
||||||
if getenv("SKIP_IHDR_FILL", "0") == "1":
|
if getenv("SKIP_IHDR_FILL", "0") == "1":
|
||||||
|
|||||||
@@ -14,9 +14,12 @@ from sentry_sdk.integrations.threading import ThreadingIntegration
|
|||||||
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
||||||
SENTRY_ENVIRONMENT = os.environ.get("SENTRY_ENVIRONMENT", "development")
|
SENTRY_ENVIRONMENT = os.environ.get("SENTRY_ENVIRONMENT", "development")
|
||||||
SENTRY_TRACES_SAMPLE_RATE = float(os.environ.get("SENTRY_TRACES_SAMPLE_RATE", "0.1"))
|
SENTRY_TRACES_SAMPLE_RATE = float(os.environ.get("SENTRY_TRACES_SAMPLE_RATE", "0.1"))
|
||||||
SENTRY_PROFILES_SAMPLE_RATE = float(os.environ.get("SENTRY_PROFILES_SAMPLE_RATE", "0.1"))
|
SENTRY_PROFILES_SAMPLE_RATE = float(
|
||||||
|
os.environ.get("SENTRY_PROFILES_SAMPLE_RATE", "0.1")
|
||||||
|
)
|
||||||
SENTRY_RELEASE = os.environ.get("SENTRY_RELEASE", "1.0.0")
|
SENTRY_RELEASE = os.environ.get("SENTRY_RELEASE", "1.0.0")
|
||||||
|
|
||||||
|
|
||||||
def initialize_sentry() -> None:
|
def initialize_sentry() -> None:
|
||||||
"""Initialize Sentry SDK once, safely."""
|
"""Initialize Sentry SDK once, safely."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user