Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

All public logs

More actions

Combined display of all available logs of Randomness wiki. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).

Logs
  • 20:34, 9 September 2024 Derg talk contribs created page Servicefailure.py (Created page with "<syntaxhighlight lang="python"> #!/usr/bin/python3 import subprocess import requests import sys import os service = sys.argv[1] proc = subprocess.Popen("hostname", stdout=subprocess.PIPE, shell=True) hostname = proc.communicate()[0].decode("utf-8").strip() status = f"Service {service} failed on {hostname}" print(status) try: import redis r = redis.Redis() r.publish("boterrorlocal", status) except Exception as e: print(e) proc = subprocess.Popen(...")