]> source.dussan.org Git - gitblit.git/commit
Reindex tickets on server start if no index exists 1168/head
authorFlorian Zschocke <florian.zschocke@devolo.de>
Sun, 5 Mar 2017 19:12:48 +0000 (20:12 +0100)
committerFlorian Zschocke <florian.zschocke@devolo.de>
Sun, 5 Mar 2017 19:27:40 +0000 (20:27 +0100)
commit63dbdfda13daa78a26f1c2e77b0a4bfd5a35df8d
tree683607a1e3dab5d29e18b77d0c4705632b74e117
parent197ddd27c8a6d304c9ba20e8ef9af9daef5f3083
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`.
src/main/java/com/gitblit/tickets/BranchTicketService.java
src/main/java/com/gitblit/tickets/FileTicketService.java
src/main/java/com/gitblit/tickets/ITicketService.java
src/main/java/com/gitblit/tickets/NullTicketService.java
src/main/java/com/gitblit/tickets/RedisTicketService.java
src/main/java/com/gitblit/tickets/TicketIndexer.java
src/main/java/com/gitblit/utils/LuceneIndexStore.java
src/test/java/com/gitblit/tests/BranchTicketServiceTest.java
src/test/java/com/gitblit/tests/FileTicketServiceTest.java
src/test/java/com/gitblit/tests/RedisTicketServiceTest.java
src/test/java/com/gitblit/tests/UITicketTest.java