@@ -112,7 +112,7 @@ def _create_task(self, params):
112
112
# display column type, for feature derivation.
113
113
nenv ["SHOW_COLUMN_TYPE" ] = "true"
114
114
params ["Envs" ] = json .dumps (nenv )
115
- val = self ._requet_and_parse_response ("CreateAlisaTask" , params )
115
+ val = self ._request_and_parse_response ("CreateAlisaTask" , params )
116
116
return val ["alisaTaskId" ], val ["status" ]
117
117
118
118
def get_status (self , task_id ):
@@ -126,7 +126,7 @@ def get_status(self, task_id):
126
126
"""
127
127
params = self ._base_params ()
128
128
params ["AlisaTaskId" ] = task_id
129
- val = self ._requet_and_parse_response ("GetAlisaTask" , params )
129
+ val = self ._request_and_parse_response ("GetAlisaTask" , params )
130
130
return AlisaTaksStatus (int (val ["status" ]))
131
131
132
132
def completed (self , status ):
@@ -165,7 +165,7 @@ def read_logs(self, task_id, offset, w):
165
165
params = self ._base_params ()
166
166
params ["AlisaTaskId" ] = task_id
167
167
params ["Offset" ] = str (offset )
168
- log = self ._requet_and_parse_response ("GetAlisaTaskLog" , params )
168
+ log = self ._request_and_parse_response ("GetAlisaTaskLog" , params )
169
169
rlen = int (log ["readLength" ])
170
170
if rlen == 0 :
171
171
return offset
@@ -186,8 +186,8 @@ def count_results(self, task_id):
186
186
"""
187
187
params = self ._base_params ()
188
188
params ["AlisaTaskId" ] = task_id
189
- res = self ._requet_and_parse_response ("GetAlisaTaskResultCount" ,
190
- params )
189
+ res = self ._request_and_parse_response ("GetAlisaTaskResultCount" ,
190
+ params )
191
191
return int (res )
192
192
193
193
def get_results (self , task_id , batch ):
@@ -210,7 +210,8 @@ def get_results(self, task_id, batch):
210
210
params ["AlisaTaskId" ] = task_id
211
211
params ["Start" ] = str (i )
212
212
params ["Limit" ] = str (batch )
213
- val = self ._requet_and_parse_response ("GetAlisaTaskResult" , params )
213
+ val = self ._request_and_parse_response ("GetAlisaTaskResult" ,
214
+ params )
214
215
header , rows = self ._parse_alisa_value (val )
215
216
if len (columns ) == 0 :
216
217
columns = header
@@ -229,7 +230,7 @@ def stop(self, task_id):
229
230
"""
230
231
params = self ._base_params ()
231
232
params ["AlisaTaskId" ] = task_id
232
- res = self ._requet_and_parse_response ("StopAlisaTask" , params )
233
+ res = self ._request_and_parse_response ("StopAlisaTask" , params )
233
234
return bool (res )
234
235
235
236
def _parse_alisa_value (self , val ):
@@ -254,7 +255,7 @@ def _parse_alisa_value(self, val):
254
255
body .append (row )
255
256
return columns , body
256
257
257
- def _requet_and_parse_response (self , action , params ):
258
+ def _request_and_parse_response (self , action , params ):
258
259
params ["Action" ] = action
259
260
params ["ProjectEnv" ] = self .config .env ["SKYNET_SYSTEM_ENV" ]
260
261
url = self .config .pop_scheme + "://" + self .config .pop_url
0 commit comments