Changeset 263


Ignore:
Timestamp:
11/04/10 16:23:07 (13 years ago)
Author:
bas
Message:

added message events to PBSQuery

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PBSQuery.py

    r246 r263  
    162162
    163163
    164                                         # We must creat sub dict, only for specified
     164                                        # We must creat sub dicts, only for specified
    165165                                        # key values
    166166                                        #
     
    171171                                                        tmp_l = v.split('=')
    172172
    173                                                         # Check if we already added the key
     173                                                        ## Support for multiple EVENT mesages in format [:key=value]+
     174                                                        #  format eg: message=EVENT:sample.time=1288864220.003:cputotals.user=0
     175                                                        #
     176                                                        if tmp_l[0] in ['message']:
     177
     178                                                                tmp_d  = dict()
     179                                                                new['event'] = class_func(tmp_d)
     180
     181                                                                message_list = v.split(':')
     182                                                                for event_type in message_list[1:]:
     183                                                                        tmp_l = event_type.split('=')
     184                                                                        new['event'][ tmp_l[0] ] = tmp_l[1:]
     185
     186                                                                ## continue with next status value
     187                                                                #
     188                                                                continue
     189
     190                                                                       
     191                                                        ## Check if we already added the key
    174192                                                        #
    175193                                                        if new.has_key(a.name):
     
    182200
    183201                                        else:
    184                                                 # Check if it is a resource type variable, eg:
     202                                                ## Check if it is a resource type variable, eg:
    185203                                                #  - Resource_List.(nodes, walltime, ..)
    186204                                                #
Note: See TracChangeset for help on using the changeset viewer.