Changeset 133


Ignore:
Timestamp:
06/13/05 10:40:59 (19 years ago)
Author:
bastiaans
Message:

plugin/togap.py:

  • Now nodes will also be reported for queued jobs
  • Will only report number of nodes for queued jobs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugin/togap.py

    r125 r133  
    204204                                start_timestamp = self.getAttr( attrs, 'mtime' )
    205205                                nodes = self.getAttr( attrs, 'exec_host' ).split( '+' )
    206                         else:
     206
     207                                nodeslist = [ ]
     208
     209                                for node in nodes:
     210                                        host = node.split( '/' )[0]
     211
     212                                        if nodeslist.count( host ) == 0:
     213                                                nodeslist.append( host )
     214
     215                        elif status == 'Q':
    207216                                start_timestamp = ''
    208                                 nodes = [ ]
    209 
    210                         nodeslist = [ ]
    211 
    212                         for node in nodes:
    213                                 host = node.split( '/' )[0]
    214 
    215                                 if nodeslist.count( host ) == 0:
    216                                         nodeslist.append( node.split( '/' )[0] )
     217                                count_mynodes = 0
     218                                numeric_node = 1
     219
     220                                for node in mynoderequest.split( '+' ):
     221
     222                                        nodepart = node.split( ':' )[0]
     223
     224                                        for letter in nodepart:
     225
     226                                                if letter not in string.digits:
     227
     228                                                        numeric_node = 0
     229
     230                                        if not numeric_node:
     231                                                count_mynodes = count_mynodes + 1
     232                                        else:
     233                                                count_mynodes = count_mynodes + int( nodepart )
     234                                               
     235                                nodeslist = [ count_mynodes ]
    217236
    218237                        myAttrs = { }
Note: See TracChangeset for help on using the changeset viewer.