(20250528) Trying not to wait for API-level logging.
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user