You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/02/08 05:29:35 UTC

[GitHub] mistercrunch closed pull request #4353: Superset Issue #4323 - Adding configurable poll interval for Hive Engine

mistercrunch closed pull request #4353: Superset Issue #4323 - Adding configurable poll interval for Hive Engine
URL: https://github.com/apache/incubator-superset/pull/4353
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/config.py b/superset/config.py
index c2da1db8b5..48c893abb2 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -359,6 +359,9 @@ class CeleryConfig(object):
 # 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 e24627cc33..a39781feb2 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -42,6 +42,7 @@
 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')
 
@@ -983,7 +984,7 @@ def handle_cursor(cls, cursor, query, session):
                     last_log_line = len(log_lines)
                 if needs_commit:
                     session.commit()
-            time.sleep(5)
+            time.sleep(hive_poll_interval)
             polled = cursor.poll()
 
     @classmethod


 

----------------------------------------------------------------
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