You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/02/08 05:29:34 UTC
[incubator-superset] branch master updated: Superset issue #4323
(#4353)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 387bf76 Superset issue #4323 (#4353)
387bf76 is described below
commit 387bf766d34de4659a1d73511720682f30ef2a99
Author: Maciej BryĆski <ma...@brynski.pl>
AuthorDate: Thu Feb 8 06:29:31 2018 +0100
Superset issue #4323 (#4353)
Adding configurable poll interval for Hive Engine
---
superset/config.py | 3 +++
superset/db_engine_specs.py | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset/config.py b/superset/config.py
index c2da1db..48c893a 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -359,6 +359,9 @@ BLUEPRINTS = []
# into a proxied one
TRACKING_URL_TRANSFORMER = lambda x: x # noqa: E731
+# Interval between consecutive polls when using Hive Engine
+HIVE_POLL_INTERVAL = 5
+
try:
if CONFIG_PATH_ENV_VAR in os.environ:
# Explicitly import config module that is not in pythonpath; useful
diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index 112b3ba..b961c03 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -42,6 +42,7 @@ from superset.utils import QueryStatus, SupersetTemplateException
config = app.config
tracking_url_trans = conf.get('TRACKING_URL_TRANSFORMER')
+hive_poll_interval = conf.get('HIVE_POLL_INTERVAL')
Grain = namedtuple('Grain', 'name label function')
@@ -993,7 +994,7 @@ class HiveEngineSpec(PrestoEngineSpec):
last_log_line = len(log_lines)
if needs_commit:
session.commit()
- time.sleep(5)
+ time.sleep(hive_poll_interval)
polled = cursor.poll()
@classmethod
--
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.