Skip to content

Commit

Permalink
perf(data): ⚡️ update data task schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Jun 17, 2024
1 parent 945dfbc commit e5c6ce4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ public DataManager(AltairVelocity altairVelocity) {
readFromFile();

// scheduled task
altairVelocity.getScheduledExecutorService().scheduleAtFixedRate(this::scheduledTask, 0, 30, TimeUnit.SECONDS);
altairVelocity
.getScheduledExecutorService()
.scheduleWithFixedDelay(
this::scheduledTask,
0,
60,
TimeUnit.SECONDS
);
}

private void saveToFile() {
Expand Down

0 comments on commit e5c6ce4

Please sign in to comment.