Skip to content

Commit

Permalink
check for 0 timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreythewang committed Feb 15, 2018
1 parent a8294dc commit 8d6123e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ def handle_error(msg):
key = '{}'.format(uuid.uuid4())
logging.info('Storing results in results backend, key: {}'.format(key))
json_payload = json.dumps(payload, default=utils.json_iso_dttm_ser)
cache_timeout = database.cache_timeout or config.get('CACHE_DEFAULT_TIMEOUT', 0)
cache_timeout = database.cache_timeout
if cache_timeout is None:
cache_timeout = config.get('CACHE_DEFAULT_TIMEOUT', 0)
results_backend.set(key, utils.zlib_compress(json_payload), cache_timeout)
query.results_key = key
query.end_result_backend_time = utils.now_as_float()
Expand Down

0 comments on commit 8d6123e

Please sign in to comment.