@@ -24,6 +24,7 @@ def __init__(
2424 token : str ,
2525 custom_headers : Optional [dict [str , str ]] = None ,
2626 extra_user_agent : Optional [str ] = None ,
27+ executions_cancellable : bool = False ,
2728 ) -> None :
2829 """Take url, token for connecting to GoodData.CN.
2930
@@ -32,6 +33,11 @@ def __init__(
3233
3334 `extra_user_agent` is optional string to be added to default http User-Agent
3435 header. This takes precedence over custom_headers setting.
36+
37+ `executions_cancellable` is a flag that sets all executions computed through this client as cancellable.
38+ In case a request for a result is interrupted, the GD server will try to free resources like killing sql queries
39+ related to the given execution.
40+ *This feature does not work yet, it will be rolled out soon.*
3541 """
3642 self ._hostname = host
3743 self ._token = token
@@ -57,6 +63,7 @@ def __init__(
5763 self ._layout_api = apis .LayoutApi (self ._api_client )
5864 self ._actions_api = apis .ActionsApi (self ._api_client )
5965 self ._user_management_api = apis .UserManagementApi (self ._api_client )
66+ self ._executions_cancellable = executions_cancellable
6067
6168 def _do_post_request (
6269 self ,
@@ -138,3 +145,7 @@ def actions_api(self) -> apis.ActionsApi:
138145 @property
139146 def user_management_api (self ) -> apis .UserManagementApi :
140147 return self ._user_management_api
148+
149+ @property
150+ def executions_cancellable (self ) -> bool :
151+ return self ._executions_cancellable
0 commit comments