Add comment.

This commit is contained in:
Andrew Lalis 2023-03-27 17:33:57 +02:00
parent c45b1da636
commit 2e1f09c5a6
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ public class GymboardSearchApplication {
private final JdbcIndexGenerator gymIndexGenerator; private final JdbcIndexGenerator gymIndexGenerator;
private final JdbcIndexGenerator userIndexGenerator; private final JdbcIndexGenerator userIndexGenerator;
/**
* Scheduled task to regenerate the indexes regularly, which is good enough
* for now.
*/
@Scheduled(fixedRate = 1, timeUnit = TimeUnit.MINUTES) @Scheduled(fixedRate = 1, timeUnit = TimeUnit.MINUTES)
public void reIndex() { public void reIndex() {
gymIndexGenerator.generate(); gymIndexGenerator.generate();