publish eve_combat_watcher.py
This commit is contained in:
parent
bc896e2916
commit
172a3e11cb
1 changed files with 5 additions and 3 deletions
|
|
@ -69,11 +69,13 @@ def main():
|
||||||
priority="high", tags="crossed_swords")
|
priority="high", tags="crossed_swords")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
w.heartbeat(cp, "combat") # announce we're alive first
|
||||||
|
gdir = find_gamelogs(cp)
|
||||||
|
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)
|
gdir = find_gamelogs(cp)
|
||||||
if not gdir:
|
|
||||||
sys.exit("Couldn't find Gamelogs dir. Set [combat] gamelogs_dir in config.ini.")
|
|
||||||
print(f"[gamelog] watching {gdir}")
|
print(f"[gamelog] watching {gdir}")
|
||||||
w.heartbeat(cp, "combat")
|
|
||||||
cur = newest(gdir)
|
cur = newest(gdir)
|
||||||
fh = open(cur, "r", encoding="utf-8", errors="ignore") if cur else None
|
fh = open(cur, "r", encoding="utf-8", errors="ignore") if cur else None
|
||||||
if fh:
|
if fh:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue