Skip to content
Snippets Groups Projects
Commit 26a656b5 authored by Brian Moe's avatar Brian Moe
Browse files
parents 8678bf49 af0850bf
No related branches found
No related tags found
No related merge requests found
...@@ -108,14 +108,11 @@ Event Summary: ...@@ -108,14 +108,11 @@ Event Summary:
#send_mail(subject, message, fromaddress, toaddresses) #send_mail(subject, message, fromaddress, toaddresses)
def issueXMPPAlert(event, location, temp_data_loc, alert_type="new", description=""): def issueXMPPAlert(event, location, temp_data_loc, alert_type="new", description=""):
f = open('tmp/foo','a')
nodename = "%s_%s"% (event.group.name, event.get_analysisType_display()) nodename = "%s_%s"% (event.group.name, event.get_analysisType_display())
nodename = nodename.lower() nodename = nodename.lower()
if nodename not in settings.XMPP_ALERT_CHANNELS: if nodename not in settings.XMPP_ALERT_CHANNELS:
f.write("nope. not in list\n")
return return
f.write("Node: %s\n" % nodename)
env = {} env = {}
env["PYTHONPATH"] = ":".join(sys.path) env["PYTHONPATH"] = ":".join(sys.path)
...@@ -134,34 +131,22 @@ def issueXMPPAlert(event, location, temp_data_loc, alert_type="new", description ...@@ -134,34 +131,22 @@ def issueXMPPAlert(event, location, temp_data_loc, alert_type="new", description
stderr=STDOUT, stderr=STDOUT,
env=env) env=env)
f.write("A\n")
xmldoc = glue.lvalert.utils.make_LVAlertTable( xmldoc = glue.lvalert.utils.make_LVAlertTable(
location, location,
event.graceid(), event.graceid(),
temp_data_loc, temp_data_loc,
alert_type, alert_type,
description) description)
f.write("B: %s\n" % str(xmldoc))
f.write("c\n")
buf = StringIO.StringIO() buf = StringIO.StringIO()
f.write("d\n")
glue.ligolw.utils.write_fileobj(xmldoc, buf) glue.ligolw.utils.write_fileobj(xmldoc, buf)
f.write("e\n")
msg = buf.getvalue() msg = buf.getvalue()
f.write("f\n")
p.stdin.write(msg) p.stdin.write(msg)
f.write("g\n")
p.stdin.close() p.stdin.close()
f.write("h\n")
for i in range(1,10): for i in range(1,10):
res = p.poll() res = p.poll()
f.write("poll %d\n" % i)
if res == None: if res == None:
f.write("poll %d\n" % i)
time.sleep(1) time.sleep(1)
else: else:
f.write("poll end\n")
break break
...@@ -43,12 +43,6 @@ def insert_ligolw_tables(xml_filename): ...@@ -43,12 +43,6 @@ def insert_ligolw_tables(xml_filename):
out += p.stdout.read() out += p.stdout.read()
if out.find("OK") != 0: if out.find("OK") != 0:
coinc_id = None coinc_id = None
try:
f = open('/tmp/foo','a')
f.write("ERROR (stdin): %s\n" % out)
f.write("ERROR (stderr): %s\n" % err)
f.close()
except: pass
else: else:
coinc_id = out[2:].strip() coinc_id = out[2:].strip()
return coinc_id return coinc_id
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment