This commit is contained in:
6
main.py
6
main.py
@@ -9,6 +9,7 @@ from sentry_sdk.integrations.ariadne import AriadneIntegration
|
||||
from sentry_sdk.integrations.redis import RedisIntegration
|
||||
from starlette.applications import Starlette
|
||||
|
||||
from services.core import get_all_authors
|
||||
from services.rediscache import redis
|
||||
from services.schema import resolvers
|
||||
from settings import DEV_SERVER_PID_FILE_NAME, MODE, SENTRY_DSN
|
||||
@@ -27,6 +28,11 @@ async def start_up():
|
||||
f.write(str(os.getpid()))
|
||||
else:
|
||||
await redis.connect()
|
||||
|
||||
# load authors cache
|
||||
authors = await get_all_authors()
|
||||
print(f"[main] {len(authors)} authors precached")
|
||||
# startup sentry monitoring services
|
||||
try:
|
||||
import sentry_sdk
|
||||
|
||||
|
Reference in New Issue
Block a user