|
9 | 9 |
|
10 | 10 | # TODO add more granular logs using __logger
|
11 | 11 | # TODO lots of sleeps in control_* de to the robot state being updated slowly after starting an action, can this be improved?
|
| 12 | +# TODO technically, the default request timeout of the API is 60s, should we update `request_timeout`? |
12 | 13 |
|
13 | 14 |
|
14 | 15 | class EvaHTTPClient:
|
@@ -159,7 +160,7 @@ def users_get(self):
|
159 | 160 | def config_update(self, update):
|
160 | 161 | r = self.api_call_with_auth(
|
161 | 162 | 'POST', 'config/update', update,
|
162 |
| - headers={'Content-Type': 'application/x.automata-update'}, timeout=30 |
| 163 | + headers={'Content-Type': 'application/x.automata-update'}, timeout=120 |
163 | 164 | )
|
164 | 165 | if r.status_code != 200:
|
165 | 166 | eva_error('config_update error', r)
|
@@ -234,13 +235,13 @@ def toolpaths_save(self, name, toolpathRepr):
|
234 | 235 |
|
235 | 236 |
|
236 | 237 | def toolpaths_use_saved(self, toolpathId):
|
237 |
| - r = self.api_call_with_auth('POST', 'toolpaths/{}/use'.format(toolpathId)) |
| 238 | + r = self.api_call_with_auth('POST', 'toolpaths/{}/use'.format(toolpathId), timeout=300) |
238 | 239 | if r.status_code != 200:
|
239 | 240 | eva_error('toolpaths_use_saved error', r)
|
240 | 241 |
|
241 | 242 |
|
242 | 243 | def toolpaths_use(self, toolpathRepr):
|
243 |
| - r = self.api_call_with_auth('POST', 'toolpath/use', json.dumps({'toolpath': toolpathRepr})) |
| 244 | + r = self.api_call_with_auth('POST', 'toolpath/use', json.dumps({'toolpath': toolpathRepr}), timeout=300) |
244 | 245 | if r.status_code != 200:
|
245 | 246 | eva_error('toolpaths_use error', r)
|
246 | 247 |
|
|
0 commit comments