Changeset 16 for trunk/grails-app/controllers/nl/tno/metagenomics/integration/SynchronizeController.groovy
- Timestamp:
- Feb 28, 2011, 10:46:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/nl/tno/metagenomics/integration/SynchronizeController.groovy
r4 r16 10 10 11 11 if( !redirectUrl ) 12 redirectUrl = g.createLink( controller: ' study' );12 redirectUrl = g.createLink( controller: 'run' ); 13 13 14 14 // Set the date of last synchronization to now. Doing it here, prevents the … … 18 18 // etc... 19 19 // synchronizationService.lastFullSynchronization = new Date(); 20 21 20 [ url: redirectUrl ] 22 21 } 23 22 24 23 def perform = { 25 synchronizationService.sessionToken = session.sessionToken 26 synchronizationService.user = session.user 27 28 synchronizationService.fullSynchronization(); 29 30 render ""; 24 try { 25 synchronizationService.sessionToken = session.sessionToken 26 synchronizationService.user = session.user 27 28 synchronizationService.fullSynchronization(); 29 render ""; 30 } catch( Exception e ) { 31 // Catch all exceptions, show them to the user (by rendering a text message) and print a stacktrace 32 log.error "Exception during full synchronization: " + e.getMessage() 33 e.printStackTrace() 34 35 render "An error occurred during synchronization (" + e.class?.name + "): " + e.getMessage(); 36 } 31 37 } 32 38 }
Note: See TracChangeset
for help on using the changeset viewer.