move flags to finally block
This commit is contained in:
parent
6d36baa952
commit
d5ee67e99b
1 changed files with 9 additions and 2 deletions
|
@ -226,6 +226,15 @@ public class DataIndexHelper implements Serializable {
|
|||
@Override
|
||||
public void run() {
|
||||
running = true;
|
||||
try {
|
||||
process();
|
||||
} finally {
|
||||
running = false;
|
||||
finished = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected void process() {
|
||||
final DataStoreFactory dataStoreFactory = ComponentUtil.getDataStoreFactory();
|
||||
dataStore = dataStoreFactory.getDataStore(dataConfig.getHandlerName());
|
||||
if (dataStore == null) {
|
||||
|
@ -242,8 +251,6 @@ public class DataIndexHelper implements Serializable {
|
|||
deleteOldDocs();
|
||||
}
|
||||
}
|
||||
running = false;
|
||||
finished = true;
|
||||
}
|
||||
|
||||
private void deleteOldDocs() {
|
||||
|
|
Loading…
Add table
Reference in a new issue