precache-authors-2
All checks were successful
deploy / deploy (push) Successful in 1m27s

This commit is contained in:
Untone 2023-12-19 17:43:17 +03:00
parent 85a40eba83
commit 531eb1f028

View File

@ -19,6 +19,10 @@ schema = make_executable_schema(load_schema_from_path("inbox.graphql"), resolver
async def start_up():
# load authors cache
authors = await get_all_authors()
print(f"[main] {len(authors)} authors precached")
if MODE == "dev":
if exists(DEV_SERVER_PID_FILE_NAME):
await redis.connect()
@ -29,9 +33,6 @@ async def start_up():
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