slightly decouple sql_json, queries, and results http endpoints from … (#8626)

* slightly decouple sql_json, queries, and results http endpoints from biz logic

* fix syntax errors

* add some type annotations, fix a bug

* remove unnecessary var decl and assign

* add a lot more type annotations to fix tests

* fix mypy issues
This commit is contained in:
Dave Smith
2019-11-22 10:12:48 -08:00
committed by Kim Truong
parent a72a39502f
commit aafbfd3b4e
2 changed files with 47 additions and 30 deletions

View File

@@ -645,13 +645,13 @@ def pessimistic_connection_handling(some_engine):
class QueryStatus:
"""Enum-type class for query statuses"""
STOPPED = "stopped"
FAILED = "failed"
PENDING = "pending"
RUNNING = "running"
SCHEDULED = "scheduled"
SUCCESS = "success"
TIMED_OUT = "timed_out"
STOPPED: str = "stopped"
FAILED: str = "failed"
PENDING: str = "pending"
RUNNING: str = "running"
SCHEDULED: str = "scheduled"
SUCCESS: str = "success"
TIMED_OUT: str = "timed_out"
def notify_user_about_perm_udate(granter, user, role, datasource, tpl_name, config):