diff --git a/eve_combat_watcher.py b/eve_combat_watcher.py index d610423..b696d8e 100644 --- a/eve_combat_watcher.py +++ b/eve_combat_watcher.py @@ -69,11 +69,13 @@ def main(): priority="high", tags="crossed_swords") return + w.heartbeat(cp, "combat") # announce we're alive first gdir = find_gamelogs(cp) - if not gdir: - sys.exit("Couldn't find Gamelogs dir. Set [combat] gamelogs_dir in config.ini.") + while not gdir: # don't die if EVE isn't running yet + print("[gamelog] no Gamelogs dir yet (EVE not started?) — retrying in 30s") + time.sleep(30) + gdir = find_gamelogs(cp) print(f"[gamelog] watching {gdir}") - w.heartbeat(cp, "combat") cur = newest(gdir) fh = open(cur, "r", encoding="utf-8", errors="ignore") if cur else None if fh: