Changeset 81


Ignore:
Timestamp:
04/18/05 10:44:30 (17 years ago)
Author:
bastiaans
Message:

daemon/togad.py:

  • New threading model for XML processing working
  • Changed determination of job ending; assume ending time = last_reported + poll_interval
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/togad.py

    r78 r81  
    187187                sys.stdin.close()
    188188                sys.stdout.close()
    189                 #sys.stderr.close()
     189                sys.stderr.close()
    190190
    191191                os.open('/dev/null', 0)
     
    287287
    288288                                self.jobAttrs[ jobid ]['status'] = 'F'
    289                                 self.jobAttrs[ jobid ]['stop_timestamp'] = jobinfo['reported']
     289                                self.jobAttrs[ jobid ]['stop_timestamp'] = str( int( jobinfo['reported'] ) + int( jobinfo['poll_interval'] ) )
    290290
    291291        def jobinfoChanged( self, jobattrs, jobid, jobinfo ):
     
    10711071        """Program startup"""
    10721072
    1073         #myTProcessor = TorqueXMLProcessor()
     1073        myTProcessor = TorqueXMLProcessor()
     1074        myTProcessor.run()
     1075
     1076        sys.exit( 1 )
     1077
    10741078        myGProcessor = GangliaXMLProcessor()
    10751079
    10761080        if DAEMONIZE:
    1077                 #torquexmlthread = threading.Thread( None, myTProcessor.daemon, 'tprocxmlthread' )
     1081                torquexmlthread = threading.Thread( None, myTProcessor.daemon, 'tprocxmlthread' )
    10781082                gangliaxmlthread = threading.Thread( None, myGProcessor.daemon, 'gprocxmlthread' )
    10791083        else:
    1080                 #torquexmlthread = threading.Thread( None, myTProcessor.run, 'tprocxmlthread' )
     1084                torquexmlthread = threading.Thread( None, myTProcessor.run, 'tprocxmlthread' )
    10811085                gangliaxmlthread = threading.Thread( None, myGProcessor.run, 'gprocxmlthread' )
    10821086
    1083         #torquexmlthread.start()
    1084         gangliaxmlthread.start()
     1087        torquexmlthread.start()
     1088        #gangliaxmlthread.start()
     1089
     1090# Global functions
    10851091
    10861092def check_dir( directory ):
Note: See TracChangeset for help on using the changeset viewer.