def __init__(self, db): self.db = db self.coll = self.db.jobconfs self.cachedir = hqconfig.cachedir() self.jobs = None self.jobslock = threading.RLock() self.cachefn = os.path.join(self.cachedir, 'jobconfigs.json')
def __init__(self, db, coordinator=None): super(JobConfigs, self).__init__(coordinator) self.db = db self.coll = self.db.jobconfs self.cachedir = hqconfig.cachedir() self.jobs = None self.jobslock = threading.RLock() self.cachefn = os.path.join(self.cachedir, 'jobconfigs.json') self.lasterror = None self.lastload = None self.currentversion = None