diff --git a/main.py b/main.py index 8fecc14..a2c1a95 100644 --- a/main.py +++ b/main.py @@ -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