-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Low Prio] add debug_timer decorator and other logs to auth.py #356
base: devel
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
@@ -56,6 +70,8 @@ def parse_jwt_token(self, request): | |||
"is_superuser": validated_body["is_superuser"], | |||
}, | |||
) | |||
delta_ms = (time.time() - start) * 1000 | |||
logger.debug(f'Getting/saving user took {delta_ms:.0f} (ms)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to refactor this code into a method and them apply the decorator the same as elsewhere.
My quick 2 cents, following the DAB philosophy. The promise of DAB is to standardize things. Having a one-off utility method like So I want to make the case here that we already have a widely shared need established. That established, the (1)st change I'd seek is putting this into proper I don't love everything about that method. I'd suggest that long-term it would be better to use a local logger (starting with |
I agree with Alan on this. Personally I can't decide if it should be |
@kdelee do you have capacity to make the requested changes? |
@john-westcott-iv lmk if this is harmless enough to include