X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/blobdiff_plain/da0d3b99c48a49db7c0bdb9ea18087e4d689c9e2..6fb70c7b05c641416a2b43c2d31be6bb8779c1d3:/files/usr/bin/invirt-consolefs?ds=sidebyside diff --git a/files/usr/bin/invirt-consolefs b/files/usr/bin/invirt-consolefs index e092c21..64f4b2a 100755 --- a/files/usr/bin/invirt-consolefs +++ b/files/usr/bin/invirt-consolefs @@ -43,15 +43,12 @@ class ConsoleFS(routefs.RouteFS): return m def recache(self): - """Refresh the local cache of VMs if the cache is more than 15 minutes old - """ - if time() - self.lasttime > 15: + if time() - self.lasttime > 5: self.lasttime = time() database.clear_cache() self.machines = dict((machine.name, machine) for machine in database.session.query(database.Machine).all()) def getMachines(self, **kw): - """Get the list of VMs in the database""" self.recache() return self.machines.keys() @@ -71,8 +68,6 @@ class ConsoleFS(routefs.RouteFS): return -errno.EINVAL def getK5login(self, machine, **kw): - """Build the ACL for a machine and turn it into a .k5login file - """ self.recache() machine = self.machines[machine] users = [acl.user for acl in machine.acl]