This commit is contained in:
36
main.py
36
main.py
@@ -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():
|
||||
|
Reference in New Issue
Block a user