Пример #1
0
 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
Пример #2
0
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')