This commit is contained in:
Eugenio Marzo
2022-10-25 17:10:22 +02:00
parent 16fcac355c
commit 6129ed43f2

View File

@@ -79,6 +79,12 @@ namespace = "kubeinvaders"
# r.delete(key)
while True:
if not r.exists("log_cleaner"):
if pathlib.Path("/var/www/html/chaoslogs.html").exists():
os.remove("/var/www/html/chaoslogs.html")
r.set(f"log_cleaner", "foobar")
r.expire(f"log_cleaner", 30)
logging.info("Loop iteration...")
file = pathlib.Path('/var/www/html/chaoslogs.html')
if not file.exists():