Revision: 17292
          http://sourceforge.net/p/gate/code/17292
Author:   valyt
Date:     2014-02-12 13:49:19 +0000 (Wed, 12 Feb 2014)
Log Message:
-----------
Fixed the destroy implementation to not use GORM, which allows it to actually 
do something. Open indexes are now proeprly closed when the server is shut down.

Modified Paths:
--------------
    
mimir/branches/5.0/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy

Modified: 
mimir/branches/5.0/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
===================================================================
--- 
mimir/branches/5.0/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
    2014-02-12 12:36:21 UTC (rev 17291)
+++ 
mimir/branches/5.0/mimir-web/grails-app/services/gate/mimir/web/LocalIndexService.groovy
    2014-02-12 13:49:19 UTC (rev 17292)
@@ -42,11 +42,7 @@
 class LocalIndexService {
   
   def grailsApplication 
-  
-  /**
-   * We don't use transactions, as we don't access the database from this 
-   * service.
-   */
+
   static transactional = true
 
   /**
@@ -243,8 +239,12 @@
     // close the local indexes in a civilised fashion
     // (for indexes that are not in READY mode, there is no civilised way!)
     log.info("Closing all open indexes")
-    LocalIndex.list().each{ LocalIndex index ->
-      if(index.state == Index.READY) close(index)
+    indexes.each{ id, MimirIndex mIndex ->
+      try {
+        mIndex.close()
+      } catch (Throwable t) {
+        log.error("Error while closing index at 
${mIndex.getIndexDirectory()}", t)
+      }
     }
   }
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to