(20250528) Trying not to wait for API-level logging.

This commit is contained in:
2025-05-28 18:26:13 +05:30
parent 5051f73725
commit 94a254474c
+6 -2
View File
@@ -912,10 +912,14 @@ def log_request_to_mongo(
# Write the log:
app_attr = getattr(current_app, attr_name)
inserted_id = await app_attr.insert_one(
# inserted_id = await app_attr.insert_one(
# collection = collection,
# document = api_log.model_dump()
# )
asyncio.create_task(app_attr.insert_one(
collection = collection,
document = api_log.model_dump()
)
))
# Return the response from the wrapped function.
if (