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