Beispiel #1
0
    def __init__(self, type, priority):
        logging.config.fileConfig("log.config")
        self.logger = logging.getLogger()
        self.logger.info("Create a new " + type + " task with priority " + str(priority))
        self.type = type
        self.runFlag = False
        self.finishFlag = False
        self.parameter = {}
        self.priority = priority
        self.note = ""
        self._schTkMgr = globalProperty.getRestSchTkMgrInstance()
        self._commonDomain = globalProperty.getCommonDomain()
        self._commonUser = globalProperty.getCommonUser()
        self._commonPassword = globalProperty.getCommonPassword()
        self._dbutil = globalProperty.getDbUtil()
        self.__toolsDir = os.path.join(os.getcwd(), "tools")

        self.macAddress = globalProperty.getMacAddress()

        # Following 2 initialization occur in restWkr
        self.jobId = None
        self.exeId = None

        if os.name == "posix":
            self.platform = "osx10"
        elif os.name == "nt":
            self.platform = "win32"
 def __init__(self):
     Thread.__init__(self)
     self.__qmsWS = QMSWebService()
     self.__macAddress = globalProperty.getMacAddress()
     self.setName("remoteListener")
     self.__status=self.getConnectStatus()
     self.updateStatus(self.__status)
     self.__statusChange=False
     self.__worker = globalProperty.getRestWorkerInstance()