etr2460 commented on a change in pull request #8454: Use `config[]` not 
`config.get()`
URL: 
https://github.com/apache/incubator-superset/pull/8454#discussion_r339325629
 
 

 ##########
 File path: superset/sql_lab.py
 ##########
 @@ -50,10 +50,10 @@
 from superset.utils.decorators import stats_timing
 
 config = app.config
-stats_logger = config.get("STATS_LOGGER")
-SQLLAB_TIMEOUT = config.get("SQLLAB_ASYNC_TIME_LIMIT_SEC", 600)
+stats_logger = config["STATS_LOGGER"]
+SQLLAB_TIMEOUT = config["SQLLAB_ASYNC_TIME_LIMIT_SEC"]
 SQLLAB_HARD_TIMEOUT = SQLLAB_TIMEOUT + 60
 
 Review comment:
   I don't think sql lab hard timeout needs to be definable in the config as 
well, the purpose for it is to provide a hard cutoff in celery if a soft 
timeout fails (or isn't implemented). The time between soft and hard timeout 
shouldn't be much, so I don't think allowing configuration gets much here. 
Happy to reconsider if you think there's a good reason to make it configurable 
though!

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to