aboutsummaryrefslogtreecommitdiffstats
path: root/python/onfailure.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/onfailure.py')
-rw-r--r--python/onfailure.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/python/onfailure.py b/python/onfailure.py
deleted file mode 100644
index c049ee56..00000000
--- a/python/onfailure.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from systemd import journal
-import os
-import sys
-
-if os.environ["EXIT_STATUS"] != "0":
- from serenitas.utils.exchange import ExchangeMessage
-
- service = sys.argv[1]
- em = ExchangeMessage()
- content = []
- j = journal.Reader()
- j.add_match(_SYSTEMD_INVOCATION_ID=os.environ["INVOCATION_ID"])
- for entry in j:
- content.append(entry["MESSAGE"])
- em.send_email(
- f"{service} failed",
- "\n".join(content),
- ("fyu@lmcg.com", "ghorel@lmcg.com"),
- save_copy=False,
- )