Skip to content

Commit

Permalink
expose results
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanpatton committed Nov 7, 2018
1 parent 50aca10 commit 8464ffc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2387,6 +2387,9 @@ def cache_key_exist(self, key):
@expose('/results/<key>/')
@log_this
def results(self, key):
return self.results_call(key)

def results_call(self, key):
"""Serves a key off of the results backend"""
if not results_backend:
return json_error_response("Results backend isn't configured")
Expand Down
9 changes: 9 additions & 0 deletions superset/views/lyft.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,14 @@ def queries(self, last_updated_ms):
return json_error_response('{}'.format(e))
return self.queries_call(last_updated_ms)

@expose('/results/<key>')
@log_this
def results(self, key):
try:
self.authorize()
except Exception as e:
return json_error_response('{}'.format(e))
return self.results_call(key)


appbuilder.add_view_no_menu(Lyft)

0 comments on commit 8464ffc

Please sign in to comment.