Hi , and thanks for awesome Sanic ! am slowly understanding it better…
Problem - I use this decorator sometimes to help with debugging, to show me the args with which a function was called. I mean - with the function itself still running, obviously. Only problem is, in Sanic, the decorator still works and prints the args, but the underlying function doesn’t run
Is there some way I can modify my decorator so it works as intended in Sanic ?
Decorator:
def print_args(func):
async def wrapper(*args, **kwargs):
print(f"Calling {func.__name__} with args: {args}, kwargs: {kwargs}")
return await func(*args, **kwargs)
return wrapper
Example function:
async def insert_data_AR(self,
ip_address: str,
user_agent: str,
AR_status_code: int,
AR_request_id: str,
AR_user_id: str,
AR_email_id: str,
AR_email: str,
AR_email_verified: bool,
AR_created_at: str,
AR_status: str,
AR_reset_sessions: bool,
AR_raw_json: str
) -> None:
...