From e9049b922a9717dab749261c284b9843a9f09447 Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 19 Nov 2021 12:50:52 +0100 Subject: [PATCH] do less writes --- src/rcgcdw.py | 2 +- src/wiki.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rcgcdw.py b/src/rcgcdw.py index 626adb4..acc6e3f 100644 --- a/src/rcgcdw.py +++ b/src/rcgcdw.py @@ -41,7 +41,7 @@ settings = src.configloader.settings _ = rcgcdw.gettext ngettext = rcgcdw.ngettext -TESTING = command_args.test # debug mode, pipeline testing +TESTING = command_args.test # debug mode, pipeline testing AUTO_SUPPRESSION_ENABLED = settings.get("auto_suppression", {"enabled": False}).get("enabled") if AUTO_SUPPRESSION_ENABLED: diff --git a/src/wiki.py b/src/wiki.py index 3114487..1cd98b8 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -108,8 +108,8 @@ class Wiki(object): last_check = self.fetch_changes(amount=amount) if last_check is not None: if settings["limitrefetch"] != -1: - storage["rcid"] = last_check[0] if last_check[0] else storage["rcid"] - storage["abuse_log_id"] = last_check[1] if last_check[1] else storage["abuse_log_id"] + storage["rcid"] = last_check[0] if last_check[0] and last_check[0] != storage["rcid"] else storage["rcid"] + storage["abuse_log_id"] = last_check[1] if last_check[1] and last_check[1] != storage["abuse_log_id"] else storage["abuse_log_id"] storage.save_datafile() else: self.memory_id = last_check