Changeset 937 for trunk/Monitoring/Watch
- Timestamp:
- 08/23/13 10:13:15 (11 years ago)
- Location:
- trunk/Monitoring/Watch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Monitoring/Watch/README
r859 r937 1 1 - to run the watcher, do 2 - cd Watch 2 3 - source /opt/python2.6_ve/bin/activate 3 4 - python watch -
trunk/Monitoring/Watch/watch
r935 r937 24 24 25 25 # line below is to include "smon" package in the search path 26 sys.path.append("/ home/jripsl/snapshot/Monitoring")26 sys.path.append("/opt/supervisor/Monitoring") 27 27 28 28 import smon.repo_io as repo_io 29 29 import smon.types 30 30 31 CSTE_BROKER_HOST='cstest-broker.ipsl.jussieu.fr' # cstest 32 #CSTE_BROKER_HOST='localhost' # vesg4 31 33 32 34 class Mail(): … … 137 139 @classmethod 138 140 def log(cls,message): 139 with open("/ home/jripsl/supervisor/log/supervisor.log", "a") as log_file:141 with open("/opt/supervisor/log/supervisor.log", "a") as log_file: 140 142 log_file.write("%s %s %s %s %s\n"%(datetime.datetime.now().strftime('%Y%m%d_%H%M%S'), message.code,message.jobid,message.timestamp,message.command)) 141 143 … … 213 215 """ 214 216 215 connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost'))217 connection = pika.BlockingConnection(pika.ConnectionParameters(host=CSTE_BROKER_HOST)) 216 218 self.channel = connection.channel() 217 219 218 #self.channel.queue_declare(queue='myqueue')219 220 220 221 print ' [*] Waiting for messages. To exit press CTRL+C' … … 311 312 #time.sleep(0.5) 312 313 314 self.channel.queue_declare(queue='myqueue') 313 315 314 316 self.channel.basic_consume(callback, queue='myqueue', no_ack=True)
Note: See TracChangeset
for help on using the changeset viewer.