Please sign in to comment.
Reindex tickets on server start if no index exists
Check if tickets need to be reindexed when the server starts. This is the case if no ticket index exists. In that case the ticket index is built. This is done during the start of the `ITicketService`. For this the interface of `ITicketService` needed to change. The `start` method was defined abstract and the specific ticket services had to implement it. None does any real starting stuff in it. The `start` method is now final. It calls a new abstract method `onStart` which the specific ticket services need to implement. In the existing implementations I just changed `start` to `onStart`.
- Loading branch information
Showing with 58 additions and 21 deletions.
- +1 −2 src/main/java/com/gitblit/tickets/BranchTicketService.java
- +1 −2 src/main/java/com/gitblit/tickets/FileTicketService.java
- +36 −7 src/main/java/com/gitblit/tickets/ITicketService.java
- +1 −2 src/main/java/com/gitblit/tickets/NullTicketService.java
- +1 −2 src/main/java/com/gitblit/tickets/RedisTicketService.java
- +13 −1 src/main/java/com/gitblit/tickets/TicketIndexer.java
- +1 −1 src/main/java/com/gitblit/utils/LuceneIndexStore.java
- +1 −1 src/test/java/com/gitblit/tests/BranchTicketServiceTest.java
- +1 −1 src/test/java/com/gitblit/tests/FileTicketServiceTest.java
- +1 −1 src/test/java/com/gitblit/tests/RedisTicketServiceTest.java
- +1 −1 src/test/java/com/gitblit/tests/UITicketTest.java