diff --git a/app/monitor-planning.py b/app/monitor-planning.py index 277d35b..1d87cf7 100644 --- a/app/monitor-planning.py +++ b/app/monitor-planning.py @@ -28,6 +28,10 @@ def notify(message): api_url = 'https://hass.jennett-wheeler.co.uk/api/webhook/-Qx6jHsGLHwbBlJpLek5Nj8qS' requests.post(api_url, json={"title": "Monitor Planning", "message": message}) +def notify_status(message): + api_url = 'https://hass.jennett-wheeler.co.uk/api/webhook/-Qx6jHsGLHwbBlJpLek5Nj8qS' + requests.post(api_url, json={"title": "Planning Script", "message": message}) + def update_other_applications(): print("Scrape Weekly List(s)") @@ -68,7 +72,7 @@ def update_other_applications(): return there_were_newly_decided_applications if __name__ == '__main__': - notify(f"Script Started") + notify_status(f"Script Started") try: with sqlite3.connect("./database.db") as connection: cursor = connection.cursor() @@ -121,7 +125,7 @@ if __name__ == '__main__': except Exception as e: print(f'Error found: {repr(e)}') print(traceback.format_exc()) - notify(f"Error in planning monitor: {repr(e)}") + notify_status(f"Error in planning monitor: {repr(e)}") try: sys.exit(130)