mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-02 10:52:22 +00:00
Monitor: forget the App tab of a destroyed guest
This commit is contained in:
@@ -2423,6 +2423,18 @@ class TaskWatcher:
|
||||
# Get VM/CT name
|
||||
vmname = self._get_vm_name(vmid) if vmid else ''
|
||||
|
||||
# A destroyed guest frees its VMID. It has no notification of its
|
||||
# own, but the cache listener must forget what belonged to it.
|
||||
if task_type in ('vzdestroy', 'qmdestroy'):
|
||||
if status == 'OK' and self._guest_lifecycle_callback:
|
||||
guest_type = 'lxc' if task_type == 'vzdestroy' else 'qemu'
|
||||
try:
|
||||
self._guest_lifecycle_callback(vmid, guest_type, 'destroy')
|
||||
except Exception as exc:
|
||||
print(f'[TaskWatcher] guest lifecycle callback failed for '
|
||||
f'{guest_type} {vmid}: {exc}', flush=True)
|
||||
return
|
||||
|
||||
# Map to event type
|
||||
event_info = self.TASK_MAP.get(task_type)
|
||||
if not event_info:
|
||||
|
||||
Reference in New Issue
Block a user