Improve: put all config item update in one transaction

This commit is contained in:
cecini 2020-11-04 21:16:49 +08:00
parent f5dca1f1e2
commit 1ef3685820

View File

@ -304,9 +304,7 @@ from notes where %s""" % lim, self.maxUsn)
return self.col.conf
def mergeConf(self, conf):
newConf = ConfigManager(self.col)
for key, value in conf.items():
self.col.set_config(key, value)
self.col.backend.set_all_config(json.dumps(conf).encode())
# Wrapper for requests that tracks upload/download progress
##########################################################################