Added Timer for template updates
Since there is no template updates dbus events, we need to check it periodically
This commit is contained in:
parent
bc07e37266
commit
806915f834
@ -383,6 +383,17 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
||||
manager.Starting.connect(self.OnStarting)
|
||||
manager.Started.connect(self.OnStarted)
|
||||
|
||||
# Check Updates Timer
|
||||
timer = QtCore.QTimer(self)
|
||||
timer.timeout.connect(self.CheckUpdates)
|
||||
timer.start(1000 * 60 * 5) # 5mins
|
||||
|
||||
def CheckUpdates(self):
|
||||
print("Checking updates")
|
||||
for vm in self.qubes_app.domains:
|
||||
if vm.klass == 'TempateVM':
|
||||
self.vms_in_table[vm.qid].update()
|
||||
|
||||
def OnDomainAdded(self, manager, domain):
|
||||
#needs to clear cache
|
||||
self.qubes_app.domains.clear_cache()
|
||||
|
Loading…
Reference in New Issue
Block a user