Update statsd.py

This commit is contained in:
lucky lin
2024-06-03 14:37:39 +08:00
committed by GitHub
parent e886fb0fcd
commit 3309ac51c5
+1 -1
View File
@@ -163,7 +163,7 @@ def main() -> NoReturn:
if len(os.listdir(STATS_DIR)) < STATS_DIR_FILE_LIMIT:
if len(result) > 0:
stats_path = os.path.join(STATS_DIR, f"{current_time.timestamp():.0f}_{idx}")
with atomic_write_in_dir(stats_path) as f:
with atomic_write_in_dir(stats_path, mode="w", overwrite=True) as f:
f.write(result)
idx += 1
else: