@@ -20,7 +20,7 @@ def to_received(self, work_id: str, message: str):
20
20
}
21
21
}
22
22
"""
23
- self .api .query (query , {"id" : work_id , "message" : message })
23
+ self .api .query (query , {"id" : work_id , "message" : message }, True )
24
24
25
25
def to_processed (self , work_id : str , message : str , in_error : bool = False ):
26
26
if self .api .bundle_send_to_queue :
@@ -35,7 +35,7 @@ def to_processed(self, work_id: str, message: str, in_error: bool = False):
35
35
}
36
36
"""
37
37
self .api .query (
38
- query , {"id" : work_id , "message" : message , "inError" : in_error }
38
+ query , {"id" : work_id , "message" : message , "inError" : in_error }, True
39
39
)
40
40
41
41
def ping (self , work_id : str ):
@@ -60,7 +60,7 @@ def report_expectation(self, work_id: str, error):
60
60
}
61
61
"""
62
62
try :
63
- self .api .query (query , {"id" : work_id , "error" : error })
63
+ self .api .query (query , {"id" : work_id , "error" : error }, True )
64
64
except :
65
65
self .api .app_logger .error ("Cannot report expectation" )
66
66
@@ -78,7 +78,9 @@ def add_expectations(self, work_id: str, expectations: int):
78
78
}
79
79
"""
80
80
try :
81
- self .api .query (query , {"id" : work_id , "expectations" : expectations })
81
+ self .api .query (
82
+ query , {"id" : work_id , "expectations" : expectations }, True
83
+ )
82
84
except :
83
85
self .api .app_logger .error ("Cannot report expectation" )
84
86
@@ -96,7 +98,9 @@ def add_draft_context(self, work_id: str, draft_context: str):
96
98
}
97
99
"""
98
100
try :
99
- self .api .query (query , {"id" : work_id , "draftContext" : draft_context })
101
+ self .api .query (
102
+ query , {"id" : work_id , "draftContext" : draft_context }, True
103
+ )
100
104
except :
101
105
self .api .app_logger .error ("Cannot report draft context" )
102
106
@@ -111,7 +115,9 @@ def initiate_work(self, connector_id: str, friendly_name: str) -> str:
111
115
}
112
116
"""
113
117
work = self .api .query (
114
- query , {"connectorId" : connector_id , "friendlyName" : friendly_name }
118
+ query ,
119
+ {"connectorId" : connector_id , "friendlyName" : friendly_name },
120
+ True ,
115
121
)
116
122
return work ["data" ]["workAdd" ]["id" ]
117
123
@@ -122,10 +128,7 @@ def delete_work(self, work_id: str):
122
128
delete
123
129
}
124
130
}"""
125
- work = self .api .query (
126
- query ,
127
- {"workId" : work_id },
128
- )
131
+ work = self .api .query (query , {"workId" : work_id }, True )
129
132
return work ["data" ]
130
133
131
134
def wait_for_work_to_finish (self , work_id : str ):
@@ -179,10 +182,7 @@ def get_work(self, work_id: str) -> Dict:
179
182
}
180
183
}
181
184
"""
182
- result = self .api .query (
183
- query ,
184
- {"id" : work_id },
185
- )
185
+ result = self .api .query (query , {"id" : work_id }, True )
186
186
return result ["data" ]["work" ]
187
187
188
188
def get_connector_works (self , connector_id : str ) -> List [Dict ]:
@@ -243,6 +243,7 @@ def get_connector_works(self, connector_id: str) -> List[Dict]:
243
243
"filterGroups" : [],
244
244
},
245
245
},
246
+ True ,
246
247
)
247
248
result = result ["data" ]["works" ]["edges" ]
248
249
return_value = []
0 commit comments