Exemplo n.º 1
0
 def RB_POST_PY(self):#8 pre custom
     self.format_log('渲染完毕执行自定义脚本','start')
     self.G_DEBUG_LOG.info('[BASE.RB_POST_PY.start.....]')
     self.G_DEBUG_LOG.info(u'如果以下路径的脚本存在,则会被执行')
     post_py=os.path.join(self.G_NODE_PY,'CG',self.G_CG_NAME,'function','post.py')
     self.G_DEBUG_LOG.info(post_py)
     if os.path.exists(post_py):
         import post as POST_PY_MODEL
         POST_PY_MODEL.main()
     
     # if not self.G_RENDER_CORE_TYPE=="gpu":
     CLASS_COMMON_UTIL.del_net_use()
     CLASS_COMMON_UTIL.del_subst()
     
     self.G_DEBUG_LOG.info('[BASE.RB_POST_PY.end.....]')
     self.format_log('done','end')
Exemplo n.º 2
0
 def RB_POST_PY(self):#8 pre custom
     self.format_log('渲染完毕执行自定义脚本','start')
     self.G_DEBUG_LOG.info('[BASE.RB_POST_PY.start.....]')
     self.G_DEBUG_LOG.info('如果以下路径的脚本存在,则会被执行')
     post_py=os.path.join(self.G_NODE_PY,'CG',self.G_CG_NAME,'function','post.py')
     self.G_DEBUG_LOG.info(post_py)
     if os.path.exists(post_py):
         import post as POST_PY_MODEL
         self.POST_DICT=POST_PY_MODEL.main()
     
     self.G_DEBUG_LOG.info('[BASE.RB_POST_PY.end.....]')
     self.format_log('done','end')
import post,time

t=0
#post.main()
wait=161
errmax=900
err=0
while(t<900):
    
    try:
        tm=0
        post.main()
        t=t+1
        err=0
    except Exception as e:
        print('ERR!')
        print(e)
        tm=int(wait*9/10)+err
        err=err+1;

    if(err>errmax):
        raise RuntimeError("ERR LIMIT")
    
    while(tm<wait):
        time.sleep(1)
        tm=tm+1
        if(tm%10==0):
            print('tm:%3d' % tm,end=' ')
    
    
    print('t:'+str(t))