You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/12/07 05:33:40 UTC

[GitHub] mistercrunch commented on a change in pull request #6484: Hook for auditing queries

mistercrunch commented on a change in pull request #6484: Hook for auditing queries
URL: https://github.com/apache/incubator-superset/pull/6484#discussion_r239699423
 
 

 ##########
 File path: superset/models/core.py
 ##########
 @@ -809,12 +810,29 @@ def needs_conversion(df_series):
                 return True
             return False
 
+        username = utils.get_username()
 
 Review comment:
   (optional): was trying to think of a way to duplicate less lines of code, maybe an inline function definition above the with block:
   ```python
   def _log_query(sql):
       if log_query:
           log_query(
               engine.url,
               sql,
               schema,
               username,
               'superset.models.core',
   )
   ```
   then the 2 calls in the with block would be one-liners

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org