def __init__(self, data=None, logger=LOGGER, loglevel=CLIENT_INFO): self.data = data components = ["sync"] if self.data: components.append(self.data) LockKey.__init__(self, components, logger=logger, loglevel=loglevel, lock_queue=lock_queue)
def __init__(self, group=None, logger=LOGGER, loglevel=CLIENT_INFO): self.group = group components = ["delete"] if self.group: components.append(self.group) LockKey.__init__(self, components, logger=logger, loglevel=loglevel, lock_queue=lock_queue)
def __init__(self, domain=None, profile=None, logger=LOGGER, loglevel=CLIENT_INFO): """Define the desired compile lock with a domain and a host. A profile could be a host or a cluster. """ self.domain = domain self.profile = profile components = ["compile"] if self.domain: components.append(self.domain) if self.profile: components.append(self.profile) elif self.profile: raise InternalError("Compile lock request for %s missing domain." % self.profile) LockKey.__init__(self, components, logger=logger, loglevel=loglevel, lock_queue=lock_queue)