Commit 1c4e2f9c authored by kpetersn's avatar kpetersn
Browse files

Improved email notification. Added link to ioc's alive page.

parent fe63cfba
......@@ -29,7 +29,9 @@ def notifyConsole(ioc, state, time_str):
def notifyEmail(ioc, state, time_str):
subject = "%s is %s" % (ioc, state)
message = "Snapshot time: %s\n%s" % (time_str, eng_url)
message = "Snapshot time: %s\n\n" % time_str
message += "%s info:\n%s%s\n\n" % (ioc, ioc_url, ioc)
message += "%s IOCs:\n%s\n" % (engineer, eng_url)
email_command = "echo \"%s\" | mailx -s \"%s\" %s" % (message, subject, recipient)
os.system(email_command)
......@@ -51,6 +53,7 @@ notify = notifyOSX
alive_url = "http://bcda.xray.aps.anl.gov/cgi-bin/alivexml.cgi"
eng_url = "http://bcda.xray.aps.anl.gov/cgi-bin/ioc_alive.cgi?eng=%s" % engineer
ioc_url = "http://bcda.xray.aps.anl.gov/cgi-bin/ioc_alive.cgi?ioc="
hb_period = 10
ioc_list = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment