From 9ab7314662a0c9a8613d6e2669107affd122fcb6 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Wed, 17 Jan 2018 17:59:45 +0100 Subject: [PATCH] Set prds.json mtime to past to force update after upload. --- upload_logs.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/upload_logs.py b/upload_logs.py index 96dc4fb..6e4539d 100644 --- a/upload_logs.py +++ b/upload_logs.py @@ -31,3 +31,12 @@ for fn in file_list: os.remove(fn) add_text = " - Please try again later." print(" ERROR: HTTP {}{}".format(r.status_code, add_text)) + +# Mark prds.json as outdated to fetch updated version +print("Mark PRD cache for update…", end="") +try: + os.utime("prds.json", times=(1, 1)) + print(" OK") +except OSError as e: + print(" FAILED") +