diff --git a/eve_orehold_watcher.py b/eve_orehold_watcher.py index 574ee16..7a19eed 100644 --- a/eve_orehold_watcher.py +++ b/eve_orehold_watcher.py @@ -56,24 +56,13 @@ CONFIG_PATH = os.path.join(HERE, "config.ini") def heartbeat(cp, source): - """Post a one-line 'watcher online' to Discord so installs are verifiable at a - glance. Deduped to at most once per 6h per source to avoid restart spam.""" - marker = os.path.join(HERE, f".hb_{source}") - try: - if os.path.exists(marker) and time.time() - os.path.getmtime(marker) < 6 * 3600: - return - except Exception: - pass + """Show 'watcher online' by EDITING one message per source (no spam on restart). + Defined here so every watcher (all import this module) shares it.""" try: host = socket.gethostname() except Exception: host = "PC" - _discord(cp, "🟢 Watcher online", f"`{source}` running on **{host}**.") - try: - with open(marker, "w") as f: - f.write(str(int(time.time()))) - except Exception: - pass + _discord_live(cp, f"hb_{source}", "🟢 Watcher online", f"`{source}` on **{host}**") # --------------------------------------------------------------------------- #