def doMatchTableStart(self, msg): if ftlog.is_debug(): ftlog.debug('DizhuMillionHeroMatchTable.doMatchTableStart gameId=', self.gameId, 'roomId=', self.roomId, 'tableId=', self.tableId, 'msg=', msg) # 牌桌清理 self._doMatchTableClear() startTime = time.time() tableInfo = msg.getKey('params') self._doUpdateTableInfo(tableInfo) if ftlog.is_debug(): ftlog.debug('DizhuMillionHeroMatchTable.doMatchTableStart gameId=', self.gameId, 'roomId=', self.roomId, 'tableId=', self.tableId, 'msg=', msg, 'usedTime=', (time.time() - startTime)) argd = {'handler': self._doMatchQuickStart} FTTasklet.create([], argd)
def _runInitFun(): global _init_fun if callable(_init_fun): FTTasklet.create([], {"handler": _init_fun}) _init_fun = None
(code, body)) if code == 200: return 0, uploadPath ftlog.info('uploader.uploadVideo Fail uploadUrl=', uploadUrl, 'uploadPath=', uploadPath, 'token=', token, 'ret=', (code, body)) return -1, '上传失败' except: return -2, '上传失败' if __name__ == '__main__': uploadUrl = 'http://up.wcsapi.biz.matocloud.com:8090/file/upload' token = '87c953283acaba7e75340fccad71c97b047569c2:MjEwN2QyMzI2NzAwNDNjYTMzYmQyYjFiYzJiMWRmODg5NDU0YmEyNQ==:eyJzY29wZSI6InR5aGFsbCIsImRlYWRsaW5lIjoiMTQ4NTUyMjU3MDAwMCIsIm92ZXJ3cml0ZSI6MCwiZnNpemVMaW1pdCI6MCwiaW5zdGFudCI6MCwic2VwYXJhdGUiOjB9' uploadUrl = 'http://zxty.up0.v1.wcsapi.com/file/upload' uploadUrl = 'http://192.168.56.200:9300/file/upload' token = '87c953283acaba7e75340fccad71c97b047569c2:OGZhZWE0MDEzZWQ5ZTU5OTdiNmJhY2YwZWNhNzc1MDMxNzAzYzAyYw==:eyJzY29wZSI6InR5aGFsbCIsImRlYWRsaW5lIjoiMTQ4NjY5ODIxNzAwMCIsIm92ZXJ3cml0ZSI6MCwiZnNpemVMaW1pdCI6MCwiaW5zdGFudCI6MCwic2VwYXJhdGUiOjB9' from freetime.core.reactor import mainloop def runUpload(): ec, info = uploadVideo(uploadUrl, token, 'ztest_video_4.txt', 'videoData_23456') print 'runupload ec=', ec, 'info=', info argd = {'handler': runUpload} FTTasklet.create([], argd) mainloop()
'uploadPath=', uploadPath, 'token=', token, 'ret=', (code, body)) if code == 200: return 0, body ftlog.info('uploader.uploadVideo Res uploadUrl=', uploadUrl, 'uploadPath=', uploadPath, 'token=', token, 'ret=', code) return -1, '上传失败' except: return -2, '上传失败' if __name__ == '__main__': uploadUrl = 'http://up.wcsapi.biz.matocloud.com:8090/file/upload/' token = '87c953283acaba7e75340fccad71c97b047569c2:MjEwN2QyMzI2NzAwNDNjYTMzYmQyYjFiYzJiMWRmODg5NDU0YmEyNQ==:eyJzY29wZSI6InR5aGFsbCIsImRlYWRsaW5lIjoiMTQ4NTUyMjU3MDAwMCIsIm92ZXJ3cml0ZSI6MCwiZnNpemVMaW1pdCI6MCwiaW5zdGFudCI6MCwic2VwYXJhdGUiOjB9' from freetime.core.reactor import mainloop def runUpload(): ec, info = uploadVideo(uploadUrl, token, 'util1.py', zlib.compress('util.py')) print 'runupload ec=', ec, 'info=', info argd = {'handler': runUpload} FTTasklet.create([], argd) mainloop()
def _runInitFun(): global _init_fun if callable(_init_fun): FTTasklet.create([], {"handler": _init_fun}) _init_fun = None