0.1.0-fixes
All checks were successful
deploy / deploy (push) Successful in 1m11s

This commit is contained in:
2023-12-22 12:09:03 +03:00
parent 5c6a680832
commit e22d5468ab
12 changed files with 340 additions and 171 deletions

12
main.py
View File

@@ -9,23 +9,23 @@ from sentry_sdk.integrations.strawberry import StrawberryIntegration
from starlette.applications import Starlette
from strawberry.asgi import GraphQL
from resolvers.listener import reactions_worker
from resolvers.listener import notifications_worker
from resolvers.schema import schema
from services.rediscache import redis
from settings import DEV_SERVER_PID_FILE_NAME, MODE, SENTRY_DSN
async def start_up():
await redis.connect()
task = asyncio.create_task(notifications_worker())
print(task)
if MODE == "dev":
if exists(DEV_SERVER_PID_FILE_NAME):
await redis.connect()
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.start_up] {notification_service_task}")
try:
import sentry_sdk