Skip to content

Commit 6855a53

Browse files
authored
Merge branch 'development' into feature/user_agent
2 parents 698f7f3 + 5defba8 commit 6855a53

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

evasdk/eva_http_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
# TODO add more granular logs using __logger
1111
# 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`?
1213

1314

1415
class EvaHTTPClient:
@@ -159,7 +160,7 @@ def users_get(self):
159160
def config_update(self, update):
160161
r = self.api_call_with_auth(
161162
'POST', 'config/update', update,
162-
headers={'Content-Type': 'application/x.automata-update'}, timeout=30
163+
headers={'Content-Type': 'application/x.automata-update'}, timeout=120
163164
)
164165
if r.status_code != 200:
165166
eva_error('config_update error', r)
@@ -234,13 +235,13 @@ def toolpaths_save(self, name, toolpathRepr):
234235

235236

236237
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)
238239
if r.status_code != 200:
239240
eva_error('toolpaths_use_saved error', r)
240241

241242

242243
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)
244245
if r.status_code != 200:
245246
eva_error('toolpaths_use error', r)
246247

0 commit comments

Comments
 (0)