schema-fix
All checks were successful
deploy / deploy (push) Successful in 1m18s

This commit is contained in:
2023-11-26 21:21:14 +03:00
parent 391958e60c
commit 2eaefaa62f
4 changed files with 79 additions and 69 deletions

36
main.py
View File

@@ -16,32 +16,30 @@ async def start_up():
if MODE == "dev":
if exists(DEV_SERVER_PID_FILE_NAME):
await redis.connect()
return
else:
with open(DEV_SERVER_PID_FILE_NAME, "w", encoding="utf-8") as f:
f.write(str(os.getpid()))
else:
await redis.connect()
notification_service_task = asyncio.create_task(reactions_worker())
print(f"[main] {notification_service_task}")
print(f"[main.start_up] {notification_service_task}")
try:
import sentry_sdk
try:
import sentry_sdk
sentry_sdk.init(
SENTRY_DSN,
enable_tracing=True,
integrations=[
StrawberryIntegration(
# Set async_execution to True if you have
# at least one async resolver
async_execution=True
),
],
)
except Exception as e:
print("[sentry] init error")
print(e)
sentry_sdk.init(
SENTRY_DSN,
enable_tracing=True,
integrations=[
StrawberryIntegration(
# Set async_execution to True if you have
# at least one async resolver
async_execution=True
),
],
)
except Exception as e:
print("[sentry] init error")
print(e)
async def shutdown():