def result_action_photon(self): if self.G_ONLY_PHOTON == 'true': upload_path = self.G_OUTPUT_USER_PATH self.rename_photon_taskid(self.G_WORK_RENDER_TASK_OUTPUT, self.G_TASK_ID, self.G_SMALL_TASK_ID) else: if self.G_KG == '102':#fast inc map upload_path = os.path.join(self.G_TEMP_PATH,'photon') if self.G_MULTI_CAMERA: upload_path = os.path.join(self.G_TEMP_PATH,'photon',self.G_SMALL_TASK_ID) else: upload_path = os.path.join(self.G_INPUT_PROJECT_PATH,'photon',self.G_SMALL_TASK_ID) self.rename_photon_taskid(self.G_WORK_RENDER_TASK_OUTPUT, self.G_TASK_ID, self.G_SMALL_TASK_ID) cmd1='c:\\fcopy\\FastCopy.exe /speed=full /force_close /no_confirm_stop /force_start "' +self.G_WORK_RENDER_TASK_OUTPUT_XXX.replace('/','\\') +'" /to="'+upload_path+'"' # cmd2='c:\\fcopy\\FastCopy.exe /speed=full /force_close /no_confirm_stop /force_start "' +self.G_WORK_RENDER_TASK_OUTPUT.replace('/','\\') +'" /to="'+self.G_OUTPUT_USER_PATH+'"' # cmd2='"' +frame_check + '" "' + self.G_WORK_RENDER_TASK_OUTPUT + '" "'+ upload_path.rstrip()+'"' cmd3='c:\\fcopy\\FastCopy.exe /cmd=move /speed=full /force_close /no_confirm_stop /force_start "' +self.G_WORK_RENDER_TASK_OUTPUT.replace('/','\\')+'\\*.*" /to="'+self.G_WORK_RENDER_TASK_OUTPUTBAK.replace('/','\\')+'"' self.rendering_copy_notify() CLASS_COMMON_UTIL.cmd(cmd1,my_log=self.G_DEBUG_LOG,try_count=3) # CLASS_COMMON_UTIL.cmd_python3(cmd1,my_log=self.G_DEBUG_LOG) # if upload_path != self.G_OUTPUT_USER_PATH: ##CLASS_COMMON_UTIL.cmd(cmd2.decode('utf-8').encode(sys.getfilesystemencoding()),my_log=self.G_DEBUG_LOG,try_count=3) # CLASS_COMMON_UTIL.cmd_python3(cmd2,my_log=self.G_DEBUG_LOG) # try: # self.check_result() # except Exception, e: # print '[check_result.err]' # print e CLASS_FRAME_CHECKER.main(self.G_WORK_RENDER_TASK_OUTPUT_XXX,upload_path,my_log=self.G_DEBUG_LOG) # CLASS_COMMON_UTIL.cmd(cmd2,my_log=self.G_DEBUG_LOG) CLASS_COMMON_UTIL.cmd(cmd3,my_log=self.G_DEBUG_LOG,try_count=3,continue_on_error=True)
def result_action(self): self.G_DEBUG_LOG.info('[BASE.result_action.start.....]') #RB_small if not os.path.exists(self.G_SMALL_PATH): os.makedirs(self.G_SMALL_PATH) if self.G_RENDER_OS == '0': output_path = "/output" outputbak_path = "/outputbak" sp_path = 'outputdata5' output_folder = self.G_OUTPUT_USER_PATH[ self.G_OUTPUT_USER_PATH.rfind(sp_path) + len(sp_path):len(self.G_OUTPUT_USER_PATH)] output_mnt_path = self.G_OUTPUT_USER_PATH.replace( output_folder, '').replace('\\', '/') output_mnt = 'mount -t cifs -o username=administrator,password=Rayvision@2016,codepage=936,iocharset=gb2312 ' + output_mnt_path + ' ' + output_path if not os.path.exists(output_path): os.makedirs(output_path) CLASS_COMMON_UTIL.cmd(output_mnt, my_shell=True) output_path = output_path + output_folder.replace("\\", "/") if not os.path.exists(output_path): os.makedirs(output_path) CLASS_COMMON_UTIL.python_copy(self.G_WORK_RENDER_TASK_OUTPUT, output_path) CLASS_COMMON_UTIL.python_copy(self.G_WORK_RENDER_TASK_OUTPUT, self.G_WORK_RENDER_TASK_OUTPUTBAK) else: # output=self.G_OUTPUT_USER_PATH.encode(sys.getfilesystemencoding()) output = self.G_OUTPUT_USER_PATH if self.G_CG_TILE_COUNT != '1' and self.G_CG_TILE_COUNT != self.G_CG_TILE: output = self.G_TILES_PATH cmd1 = 'c:\\fcopy\\FastCopy.exe /speed=full /force_close /no_confirm_stop /force_start "' + self.G_WORK_RENDER_TASK_OUTPUT.replace( '/', '\\') + '" /to="' + output + '"' # cmd2='"' +frame_check + '" "' + self.G_WORK_RENDER_TASK_OUTPUT + '" "'+ output.rstrip()+'"' cmd3 = 'c:\\fcopy\\FastCopy.exe /cmd=move /speed=full /force_close /no_confirm_stop /force_start "' + self.G_WORK_RENDER_TASK_OUTPUT.replace( '/', '\\' ) + '\\*.*" /to="' + self.G_WORK_RENDER_TASK_OUTPUTBAK.replace( '/', '\\') + '"' CLASS_COMMON_UTIL.cmd(cmd1, my_log=self.G_DEBUG_LOG, try_count=3) # CLASS_COMMON_UTIL.cmd_python3(cmd1,my_log=self.G_DEBUG_LOG) try: self.check_result() except Exception as e: print('[check_result.err]') print(e) CLASS_FRAME_CHECKER.main(self.G_WORK_RENDER_TASK_OUTPUT, output, my_log=self.G_DEBUG_LOG) # CLASS_COMMON_UTIL.cmd(cmd2,my_log=self.G_DEBUG_LOG) CLASS_COMMON_UTIL.cmd(cmd3, my_log=self.G_DEBUG_LOG, try_count=3, continue_on_error=True) self.G_DEBUG_LOG.info('[BASE.result_action.end.....]')
def result_action(self): self.G_DEBUG_LOG.info('[Max.result_action.start.....]') output=self.G_OUTPUT_USER_PATH if self.G_CG_TILE_COUNT !='1' and self.G_CG_TILE_COUNT!=self.G_CG_TILE: output=self.G_TILES_PATH cmd1='c:\\fcopy\\FastCopy.exe /speed=full /force_close /no_confirm_stop /force_start "' +self.G_WORK_RENDER_TASK_OUTPUT_XXX.replace('/','\\') +'" /to="'+output+'"' cmd3='c:\\fcopy\\FastCopy.exe /cmd=move /speed=full /force_close /no_confirm_stop /force_start "' +self.G_WORK_RENDER_TASK_OUTPUT.replace('/','\\')+'\\*.*" /to="'+self.G_WORK_RENDER_TASK_OUTPUTBAK.replace('/','\\')+'"' # CLASS_COMMON_UTIL.cmd_python3(cmd1,my_log=self.G_DEBUG_LOG) CLASS_COMMON_UTIL.cmd(cmd1,my_log=self.G_DEBUG_LOG) try: self.check_result() except Exception as e: print('[check_result.err]') print(e) CLASS_FRAME_CHECKER.main(self.G_WORK_RENDER_TASK_OUTPUT_XXX,output,my_log=self.G_DEBUG_LOG) CLASS_COMMON_UTIL.cmd(cmd3,my_log=self.G_DEBUG_LOG,try_count=3,continue_on_error=True) self.G_DEBUG_LOG.info('[Max.result_action.end.....]')