Changeset 317 for trunk/jobmond


Ignore:
Timestamp:
04/18/07 15:49:27 (17 years ago)
Author:
bastiaans
Message:

jobmond/jobmond.conf:

  • added QUEUE option

jobmond/jobmond.py:

  • implemented QUEUE option (thanks to Michael Jeanson)
Location:
trunk/jobmond
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jobmond/jobmond.conf

    r271 r317  
    1212# What Batch type is the system
    1313#
    14 # Currently supported: pbs, sge
     14# Currently supported: pbs, sge (experimental)
    1515#
    1616BATCH_API               : pbs
     
    1919#
    2020BATCH_SERVER            : localhost
     21
     22# Which queue(s) to report jobs of
     23# (optional and only supported for pbs)
     24#
     25#QUEUE                  : long, short
    2126
    2227# How many seconds interval for polling of jobs
  • trunk/jobmond/jobmond.py

    r307 r317  
    109109        cfg.read( filename )
    110110
    111         global DEBUG_LEVEL, DAEMONIZE, BATCH_SERVER, BATCH_POLL_INTERVAL, GMOND_CONF, DETECT_TIME_DIFFS, BATCH_HOST_TRANSLATE, BATCH_API
     111        global DEBUG_LEVEL, DAEMONIZE, BATCH_SERVER, BATCH_POLL_INTERVAL, GMOND_CONF, DETECT_TIME_DIFFS, BATCH_HOST_TRANSLATE, BATCH_API, QUEUE
    112112
    113113        DEBUG_LEVEL = cfg.getint( 'DEFAULT', 'DEBUG_LEVEL' )
     
    156156                        debug_msg( 0, "fatal error: BATCH_API not set and can't make guess" )
    157157                        sys.exit( 1 )
     158
     159        try:
     160
     161                QUEUE = cfg.getlist( 'DEFAULT', 'QUEUE' )
     162
     163        except ConfigParser.NoOptionError, detail:
     164
     165                QUEUE = None
    158166       
    159167        return True
     
    357365                        name = self.getAttr( attrs, 'Job_Name' )
    358366                        queue = self.getAttr( attrs, 'queue' )
     367
     368                        if QUEUE:
     369
     370                                if QUEUE != queue:
     371
     372                                        continue
     373
    359374                        owner = self.getAttr( attrs, 'Job_Owner' ).split( '@' )[0]
    360375                        requested_time = self.getAttr( attrs, 'Resource_List.walltime' )
Note: See TracChangeset for help on using the changeset viewer.