self.log.error("self._chkNextRun rc = %s" % rc) return rc # Run workflows if self._wkfVehPOWkly() != 0 : return 1 # Loading Staging Succeeded. Update the control file. rc = fu.updFile(ctlFile,cur_dayr) if rc == 0 : if self.checkNextRunFlg: self.log.info('Updated Cur Load Date from %s to %s , Control File %s' % (prev_dayr,cur_dayr, ctlFile)) else : self.log.info('Overwriting Cur Load Date from %s to %s , Control File %s' % (prev_dayr,cur_dayr, ctlFile)) else : self.log.error('Could not Update Load Date %s, Control File %s rc = %s' % (cur_dayr,ctlFile,rc)) return rc for i in range (len(self.srcFile)): t = '%s/%s' % (self.ib.workDir,self.srcFile[i]) r = fu.delFile(t) self.log.info('Removing %s rc = %s ' % (t,r)) return rc def main(Args): a = VehPOLIWkly() rc = a.main(Args) return rc if __name__ == '__main__': from setwinenv import setEnvVars # Remove in UX setEnvVars() # Remove in UX rc= main(sys.argv)
self.ib.wkf = 'wkf_ppc_ranking_research_monthly' #rc = pi.runWkflWait(self.ib,self.log) rc = 0 if rc != 0 : self.log.error('Running %s.%s rc = %s' % (self.ib.fld,self.ib.wkf,rc)) else : self.log.info('Running %s.%s rc = %s' % (self.ib.fld,self.ib.wkf,rc)) return rc def wkfAsstPartPriceMonMthly(self): self.ib.fld = 'Asset' self.ib.wkf = 'wkf_part_price_monitor_monthly' #rc = pi.runWkflWait(self.ib,self.log) rc = 0 if rc != 0 : self.log.error('Running %s.%s rc = %s' % (self.ib.fld,self.ib.wkf,rc)) else : self.log.info('Running %s.%s rc = %s' % (self.ib.fld,self.ib.wkf,rc)) return rc def main(Args): a = VehFifthWkday() rc = a.main(Args) return rc if __name__ == '__main__': from setwinenv import setEnvVars # Remove in UX setEnvVars() rc= main(sys.argv) sys.exit(rc)
self.appName, self.hostname) if rc == 0 else "ERROR running %s on %s" % ( self.appName, self.hostname) #r, msg = sm.sendNotif(rc, self.log, subj, text, [logFile, ]) r = -1 msg = "Need to enable notification" self.log.info('Sending Notification\t%s rc = %s' % (msg, r)) else: self.log.info( 'Notification Overrided. Not sending message (RET_WARN) rc = %s ' % rc) self.printEnvBean() return rc def __del___(self): self.log.debug('Base class cleaning') # Use this for testing in windows env only. Should not use in UX if __name__ == '__main__': from setwinenv import setEnvVars os.environ['LOG_LEVEL'] = 'DEBUG' setEnvVars() bd = r'C:/apps' a = _BaseApp(bd) rc = a.main(sys.argv) #rc = a.main(['cfg','ABCD']) #rc = a.main(['cfg', 'ABCD'])