mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
fix: improve actions waiting timeout based on data (#488)
##### SUMMARY Some action waiting time have been set to an arbitrary number, which could force the users to wait for too long, while we could have raised a timeout. This changes the arbitrary numbers with rough estimate based on the average actions time and some leeway.
This commit is contained in:
parent
04835d543f
commit
07095529a4
14 changed files with 113 additions and 69 deletions
|
|
@ -129,7 +129,8 @@ class AnsibleHCloudRoute(AnsibleHCloud):
|
|||
|
||||
if not self.module.check_mode:
|
||||
try:
|
||||
self.hcloud_network.add_route(route=route).wait_until_finished()
|
||||
action = self.hcloud_network.add_route(route=route)
|
||||
action.wait_until_finished()
|
||||
except HCloudException as exception:
|
||||
self.fail_json_hcloud(exception)
|
||||
|
||||
|
|
@ -149,7 +150,8 @@ class AnsibleHCloudRoute(AnsibleHCloud):
|
|||
if self.hcloud_route is not None and self.hcloud_network is not None:
|
||||
if not self.module.check_mode:
|
||||
try:
|
||||
self.hcloud_network.delete_route(self.hcloud_route).wait_until_finished()
|
||||
action = self.hcloud_network.delete_route(self.hcloud_route)
|
||||
action.wait_until_finished()
|
||||
except HCloudException as exception:
|
||||
self.fail_json_hcloud(exception)
|
||||
self._mark_as_changed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue