Merge remote-tracking branch 'mainRepo/master' into 7894/show-one-time-payment-invoices
This commit is contained in:
commit
ffae844ee5
5 changed files with 23 additions and 10 deletions
|
|
@ -1817,7 +1817,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
)
|
||||
response['text'] = str(_('Error terminating VM')) + str(vm.id)
|
||||
else:
|
||||
for t in range(15):
|
||||
for t in range(settings.MAX_TIME_TO_WAIT_FOR_VM_TERMINATE):
|
||||
try:
|
||||
manager.get_vm(vm.id)
|
||||
except WrongIdError:
|
||||
|
|
@ -1840,6 +1840,10 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
|||
)
|
||||
break
|
||||
else:
|
||||
logger.debug(
|
||||
'Sleeping 2 seconds for terminate action on VM %s' %
|
||||
vm.id
|
||||
)
|
||||
sleep(2)
|
||||
if not response['status']:
|
||||
response['text'] = str(_("VM terminate action timed out. "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue