From 2c2b47855b275df0e25245b7b1623da88ef21454 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 3 Aug 2023 15:23:35 +0800 Subject: [PATCH] reduce one time disk I/O when url changed. --- chrome_tixcraft.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome_tixcraft.py b/chrome_tixcraft.py index 5bfd592..7045e82 100644 --- a/chrome_tixcraft.py +++ b/chrome_tixcraft.py @@ -11088,15 +11088,19 @@ def main(args): if len(url) == 0: continue + is_maxbot_paused = False + if os.path.exists(CONST_MAXBOT_INT28_FILE): + is_maxbot_paused = True + if len(url) > 0 : if url != last_url: print(url) write_last_url_to_file(url) - if os.path.exists(CONST_MAXBOT_INT28_FILE): + if is_maxbot_paused: print("MAXBOT Paused.") last_url = url - if os.path.exists(CONST_MAXBOT_INT28_FILE): + if is_maxbot_paused: time.sleep(0.2) continue