Data save - Solving JSON DB saving bug (#3286 #3260 #3259)

pull/3287/head
Jakob Stadler 2025-06-28 09:13:41 +00:00 zatwierdzone przez GitHub
rodzic 58e2a41c95
commit b8ecfff861
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -412,7 +412,7 @@ class ChangeDetectionStore:
with open(self.json_store_path+".tmp", 'w') as json_file:
# Use compact JSON in production for better performance
json.dump(data, json_file, indent=2)
os.replace(self.json_store_path+".tmp", self.json_store_path)
os.replace(self.json_store_path+".tmp", self.json_store_path)
except Exception as e:
logger.error(f"Error writing JSON!! (Main JSON file save was skipped) : {str(e)}")