예제 #1
0
파일: swamp_common.py 프로젝트: nco/swamp
    def __init__(self, config, executor=None):
        self.config = config
        self.config.dumpSettings(log, logging.DEBUG)

        statistics.initTracker(config)

        if executor:
            self.defaultExecutor = executor
        else:
            self.defaultExecutor = FakeExecutor()

        if config.execSlaveNodes > 0:
            remote = []
            for i in range(config.execSlaveNodes):
                s = config.slave[i]
                remote.append(RemoteExecutor(s[0], s[1]))
            self.executor = remote
        else:
            self.executor = [self.defaultExecutor]
        self.mainThread = SwampInterface.MainThread(self)
        self.variablePreload = {}
        pass