def __init__(self, name, threads=None): self.log = SoundforestLogger().default_stream self.db = ConfigDB() if threads is None: threads = self.db.get('threads') if threads is None: threads = 1 else: threads = int(threads) self.threads = threads
class ScriptThreadManager(list): def __init__(self, name, threads=None): self.log = SoundforestLogger().default_stream self.db = ConfigDB() if threads is None: threads = self.db.get('threads') if threads is None: threads = 1 else: threads = int(threads) self.threads = threads def get_entry_handler(self, entry): raise NotImplementedError('Must be implemented in child class') def run(self): raise NotImplementedError('Must be implemented in child class')