Skip to content

Commit a46276b

Browse files
committed
server: Run start() with a generous timeout by default
The 10 second CloudManager default is not quite sufficient here.
1 parent a5d8442 commit a46276b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

upcloud_api/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,14 @@ def stop(self): # noqa
160160
"""
161161
self.shutdown()
162162

163-
def start(self):
163+
def start(self, timeout=120):
164164
"""
165165
Start the server. Note: slow and blocking request.
166166
167167
The API waits for confirmation from UpCloud's IaaS backend before responding.
168168
"""
169169
path = '/server/{0}/start'.format(self.uuid)
170-
self.cloud_manager.post_request(path)
170+
self.cloud_manager.post_request(path, timeout=timeout)
171171
object.__setattr__(self, 'state', 'started')
172172

173173
def restart(self, hard=False, timeout=30, force=True):

0 commit comments

Comments
 (0)