This commit is contained in:
parent
85a40eba83
commit
531eb1f028
7
main.py
7
main.py
|
@ -19,6 +19,10 @@ schema = make_executable_schema(load_schema_from_path("inbox.graphql"), resolver
|
||||||
|
|
||||||
|
|
||||||
async def start_up():
|
async def start_up():
|
||||||
|
# load authors cache
|
||||||
|
authors = await get_all_authors()
|
||||||
|
print(f"[main] {len(authors)} authors precached")
|
||||||
|
|
||||||
if MODE == "dev":
|
if MODE == "dev":
|
||||||
if exists(DEV_SERVER_PID_FILE_NAME):
|
if exists(DEV_SERVER_PID_FILE_NAME):
|
||||||
await redis.connect()
|
await redis.connect()
|
||||||
|
@ -29,9 +33,6 @@ async def start_up():
|
||||||
else:
|
else:
|
||||||
await redis.connect()
|
await redis.connect()
|
||||||
|
|
||||||
# load authors cache
|
|
||||||
authors = await get_all_authors()
|
|
||||||
print(f"[main] {len(authors)} authors precached")
|
|
||||||
# startup sentry monitoring services
|
# startup sentry monitoring services
|
||||||
try:
|
try:
|
||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
|
|
Loading…
Reference in New Issue
Block a user