diff --git a/utils_v2/api/async_quart.py b/utils_v2/api/async_quart.py index 2bcabe3..08a8fc9 100644 --- a/utils_v2/api/async_quart.py +++ b/utils_v2/api/async_quart.py @@ -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 (