Example #1
0
File: web.py Project: fordguo/stdpm
 def procInfo(result,msg):
   yamContent = result[0][0]
   lp = LPConfig(yaml.load(yamContent))
   alert = 'info'
   if lp.fileUpdateInfo():
     clientIpDict[ip]['protocol'].sendJson(json.dumps({'action':'procOp','op':cmdStr,'grp':names[1],'name':names[2]}))
   else:
     msg += " invalid"
     alert = 'error'
   delayRender(msg,alert)
Example #2
0
 def _start(self,name,procInfo,memo=''):
   localValue = self.locals.get(name)
   localProc = LocalProcess(name,self)
   conf = None
   if localValue:
     localValue[0] =localProc
     conf = localValue[1]
   else:
     conf = LPConfig(procInfo)
     conf.verifyLog()
     localValue = [localProc,conf]
     self.locals[name] = localValue
   localProc.startMemo = memo
   reactor.spawnProcess(localProc,conf.executable, conf.execArgs,conf.env,\
     conf.path,conf.uid,conf.gid,conf.usePTY,conf.childFDs)