Skip to content

Commit

Permalink
directly overwrite file, no lag
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathaniel Moschkin committed Dec 6, 2023
1 parent e98c73b commit 2b4a99b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/logic/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ export async function createStats(force?: boolean) {

if (fs.existsSync(dailyfile)) {
let rt = fs.statSync(dailyfile);
if (force || rt.mtime.getDay() !== (mynow.getDay())) {
fs.rmSync(dailyfile);
}
else {
if (!force && rt.mtime.getDay() === (mynow.getDay())) {
setTimeout(() => createStats(), 1000 * 60 * 30);
return;
}
Expand Down

0 comments on commit 2b4a99b

Please sign in to comment.