perf: mysql postgresql

This commit is contained in:
feng
2022-10-24 20:24:56 +08:00
parent 64daacce63
commit f743dea1fd
5 changed files with 11 additions and 27 deletions

View File

@@ -199,8 +199,8 @@ class JMSInventory:
def write_to_file(self, path):
path_dir = os.path.dirname(path)
data = self.generate(path_dir)
if not os.path.exists(path_dir):
os.makedirs(path_dir, 0o700, True)
data = self.generate(path_dir)
with open(path, 'w') as f:
f.write(json.dumps(data, indent=4))