@@ -24,6 +24,7 @@ def __init__(
24
24
token : str ,
25
25
custom_headers : Optional [dict [str , str ]] = None ,
26
26
extra_user_agent : Optional [str ] = None ,
27
+ executions_cancellable : bool = False ,
27
28
) -> None :
28
29
"""Take url, token for connecting to GoodData.CN.
29
30
@@ -32,6 +33,11 @@ def __init__(
32
33
33
34
`extra_user_agent` is optional string to be added to default http User-Agent
34
35
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.*
35
41
"""
36
42
self ._hostname = host
37
43
self ._token = token
@@ -57,6 +63,7 @@ def __init__(
57
63
self ._layout_api = apis .LayoutApi (self ._api_client )
58
64
self ._actions_api = apis .ActionsApi (self ._api_client )
59
65
self ._user_management_api = apis .UserManagementApi (self ._api_client )
66
+ self ._executions_cancellable = executions_cancellable
60
67
61
68
def _do_post_request (
62
69
self ,
@@ -138,3 +145,7 @@ def actions_api(self) -> apis.ActionsApi:
138
145
@property
139
146
def user_management_api (self ) -> apis .UserManagementApi :
140
147
return self ._user_management_api
148
+
149
+ @property
150
+ def executions_cancellable (self ) -> bool :
151
+ return self ._executions_cancellable
0 commit comments