villebro commented on a change in pull request #8454: Use `config[]` not
`config.get()`
URL:
https://github.com/apache/incubator-superset/pull/8454#discussion_r340331197
##########
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:
Not feeling especially opinionated on this one, but in general I have an
aversion to hard coding parameters, especially in the context of
distributed/async problems which are extra horrible to debug. So, at the risk
of cluttering the config file, I would still vote for introducing the config
parameter `SQLLAB_HARD_TIMEOUT_ADDON` or similar with a concise comment that
might save someone down the line a few hours of grief.
**But**: this ended up sounding much more dramatic than it probably is, so
happy either way!
----------------------------------------------------------------
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]