Skip to content

Commit

Permalink
Optimize prune schedule frequency to 1 minute.
Browse files Browse the repository at this point in the history
Updated the scheduled executor to run the prune operation every minute instead of using a configurable value. This ensures that files are pruned in a timely manner, preventing long-expired files from persisting.
  • Loading branch information
NonSwag committed Sep 18, 2024
1 parent 2cc5ca6 commit 2657e7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private Arkitektonika() {

private void start() {
try (var executor = Executors.newSingleThreadScheduledExecutor()) {
executor.scheduleAtFixedRate(this::prune, 0, config.prune(), TimeUnit.MILLISECONDS);
executor.scheduleAtFixedRate(this::prune, 0, 1, TimeUnit.MINUTES);
javalin.start(Integer.getInteger("port", config.port()));
}
}
Expand Down

0 comments on commit 2657e7f

Please sign in to comment.