slapos.grid.promise: prevent json file corruption while updating data
history and statistics files are sometimes corrupted because of invalid json We do 2 things to improve this: 1. we use json.load to read the previous file (this will detect if the file is corrupted) 2. we use json.dump to write the entire file at once in a temporary file and then we move this file to be atomic. Probably this will consume more resources. See merge request !728
Showing
Please register or sign in to comment