def update(): global _datafiles, _categories _datafiles = set() _categories = set(), set(), set(), set(), set(), set(), set(), set() filenames = os.listdir(paths.configdir) filenames += os.listdir(paths.datadir) filenames += os.listdir(paths.resultsdir) filenames += os.listdir(paths.pngdir) filenames += os.listdir(paths.predir) for filename in filenames: idx = names.split_jobname(filename) if idx is not None: _datafiles.add(filename) _categories[idx].add(filename)
def update(): global _finished, _running _finished = set() _running = set() datafile.update() available = datafile.data_available() for filename in available: key = names.name2key(filename) assert key is not None _finished.add(key) running_jobs = qstat.get_running_jobs() for jobname, jobid in running_jobs: if names.split_jobname(jobname) is not None: _running.add(names.name2key(jobname))