Changeset 877
- Timestamp:
- 06/12/13 12:00:14 (11 years ago)
- Location:
- trunk/Monitoring
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Monitoring/Analyze/analyze
r876 r877 73 73 74 74 message=repo_io.retrieve_last_message(simulation) 75 75 76 except types.MessageNotFoundException, e: 76 77 -
trunk/Monitoring/Watch/watch
r876 r877 57 57 @classmethod 58 58 def store_msg(cls,message): 59 repo_io.create_message(message) 59 60 # the simu exists when we are here (see TAG0001 tag) 61 s=repo_io.retrieve_simulation(message.simuid) 62 63 repo_io.create_message(message,s) 60 64 61 65 @classmethod … … 127 131 128 132 # debug 129 mapping = { "0000":["log", "store_msg", "print_stdout", "crea_sim"], 133 # 134 # TAG0001: note that crea_sim must be BEFORE store_msg in the list (because when we insert the msg, we need the simu_id) 135 # 136 mapping = { "0000":["crea_sim", "log", "store_msg", "print_stdout"], 130 137 "0100":["log", "store_msg", "print_stdout", "set_sim_status_to_complete"], 131 138 "1000":["log", "store_msg", "print_stdout"], … … 138 145 139 146 # prod 147 # 148 # TAG0001: note that crea_sim must be BEFORE store_msg in the list (because when we insert the msg, we need the simu_id) 149 # 140 150 """ 141 mapping = { "0000":[" log", "store_msg", "crea_sim"],151 mapping = { "0000":["crea_sim", "log", "store_msg"], 142 152 "0100":["log", "store_msg", "set_sim_status_to_complete"], 143 153 "1000":["log", "store_msg"], -
trunk/Monitoring/smon/local_repo.py
r876 r877 140 140 _conn.commit() 141 141 142 def create_message(message ):142 def create_message(message,simulation): 143 143 144 _conn.execute("insert into message (simulation_id,crea_date) values (?,?)",( message.simuid, message.timestamp))144 _conn.execute("insert into message (simulation_id,crea_date) values (?,?)",(simulation.id, message.timestamp)) 145 145 146 146 _conn.commit() -
trunk/Monitoring/smon/repo_io.py
r876 r877 81 81 82 82 def populate_tables_with_sample(): 83 """ 84 used only by "repo-state" pgm 85 """ 86 83 87 repo.populate_tables_with_sample() 84 88 85 89 def retrieve_simulations(): 90 """ 91 used by get_running_simulations 92 """ 86 93 return repo.retrieve_simulations() 87 94 … … 252 259 raise Exception("ERR019 - incorrect mode") 253 260 254 def create_message(message ):255 if mode==CSTE_MODE_LOCAL_REPO: 256 repo.create_message(message )261 def create_message(message,simulation): 262 if mode==CSTE_MODE_LOCAL_REPO: 263 repo.create_message(message,simulation) 257 264 elif mode==CSTE_MODE_REMOTE_REPO: 258 265
Note: See TracChangeset
for help on using the changeset viewer.