Ignore:
Timestamp:
12.12.2011 21:54:06 (5 months ago)
Author:
zmsdev
Message:

applied minor performance-fixes (2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ZMS/trunk/_filtermanager.py

    r1557 r1761  
    339339# ------------------------------------------------------------------------------ 
    340340def moveFilterProcess(self, id, pid, pos): 
    341   if _globals.debug( self): 
    342     _globals.writeLog( self, '[moveFilterProcess]:id=%s; pid=%s; dir=%s'%(id,str(pid),str(dir))) 
     341  _globals.writeLog( self, '[moveFilterProcess]:id=%s; pid=%s; dir=%s'%(id,str(pid),str(dir))) 
    343342  # Set. 
    344343  obs = getRawFilters(self) 
     
    396395# ------------------------------------------------------------------------------ 
    397396def processMethod(self, processId, filename, trans, REQUEST): 
    398   if _globals.debug( self): 
    399     _globals.writeLog( self, '[processMethod]: processId=%s'%processId) 
     397  _globals.writeLog( self, '[processMethod]: processId=%s'%processId) 
    400398  infilename = filename 
    401399  outfilename = filename 
     
    419417# ------------------------------------------------------------------------------ 
    420418def processCommand(self, filename, command): 
    421   if _globals.debug( self): 
    422     _globals.writeLog( self, '[processCommand]: infilename=%s'%filename) 
     419  _globals.writeLog( self, '[processCommand]: infilename=%s'%filename) 
    423420  infilename = _fileutil.getOSPath( filename) 
    424421  outfilename = _fileutil.getOSPath( filename) 
     
    446443  command = command.replace( mIn,infilename) 
    447444  command = command.replace( mOut,tmpoutfilename) 
    448   if _globals.debug( self): 
    449     _globals.writeLog( self, '[processCommand]: command=%s'%command) 
     445  _globals.writeLog( self, '[processCommand]: command=%s'%command) 
    450446  os.system(command) 
    451447  # Check if output file exists. 
    452448  try:  
    453449    os.stat( _fileutil.getOSPath( tmpoutfilename))  
    454     if _globals.debug( self): 
    455       _globals.writeLog( self, '[processCommand]: rename %s to %s'%( tmpoutfilename, outfilename)) 
     450    _globals.writeLog( self, '[processCommand]: rename %s to %s'%( tmpoutfilename, outfilename)) 
    456451    try: 
    457452      os.remove( outfilename) 
     
    465460    os.remove( infilename) 
    466461  # Return filename. 
    467   if _globals.debug( self): 
    468     _globals.writeLog( self, '[processCommand]: outfilename=%s'%( outfilename)) 
     462  _globals.writeLog( self, '[processCommand]: outfilename=%s'%( outfilename)) 
    469463  return outfilename 
    470464 
     
    476470# ------------------------------------------------------------------------------ 
    477471def processFile(self, processId, filename, trans=None): 
    478   if _globals.debug( self): 
    479     _globals.writeLog( self, '[processFile]: processId=%s'%processId) 
     472  _globals.writeLog( self, '[processFile]: processId=%s'%processId) 
    480473  folder = _fileutil.getFilePath(filename) 
    481474  processOb = self.getProcess(processId) 
     
    532525  # Read File. 
    533526  else: 
    534     if _globals.debug( self): 
    535       _globals.writeLog( self, '[exportFilter]: Read %s'%outfilename) 
     527    _globals.writeLog( self, '[exportFilter]: Read %s'%outfilename) 
    536528    f = open(outfilename, 'rb') 
    537529    data = f.read() 
Note: See TracChangeset for help on using the changeset viewer.