示例#1
0
文件: main.py 项目: fordguo/stdpm
 def connectionMade(self):
   global client
   client = self
   process.registerSendStatus(self.sendProcStatus)
   self.sendFileUpdate(None,None,lastFileUpdateTime(None,None))
   self._initSend()
   self.sendJson(json.dumps({'action':'clientVersion','value':version}))
示例#2
0
文件: main.py 项目: fordguo/stdpm
 def _initSend(self):
   for procGroup in procGroupDict.itervalues():
     for name,procInfo in procGroup.iterMap():
       self.sendYaml("%s:%s:%s"%(procGroup.name,name.replace(':',SEP),yaml.dump(procInfo,default_flow_style=None)))
     for name,proc in procGroup.iterStatus():
       self.sendProcStatus(procGroup.name,name,proc[0].status)
       self.sendFileUpdate(procGroup.name,name,lastFileUpdateTime(procGroup.name,name))
       self.sendJson(json.dumps({'action':'procLogInfo','group':procGroup.name,'name':name,'monLog':proc[1].monLog}))