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")
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue