Changeset 6 for trunk/grails-app/services/nl/tno/metagenomics/integration/SynchronizationService.groovy
- Timestamp:
- Jan 19, 2011, 2:19:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/nl/tno/metagenomics/integration/SynchronizationService.groovy
r4 r6 103 103 def studies 104 104 if( eager ) { 105 studies = Study.list().findAll { !it.trashcan };106 log.trace "Eager synchronization : " + studies.size();105 studies = [] 106 log.trace "Eager synchronization"; 107 107 } else { 108 108 studies = Study.findAllWhere( [isDirty: true] ); 109 109 log.trace "Default synchronization: " + studies.size() 110 111 // Perform no synchronization if no studies have to be synchronized 112 if( studies.size() == 0 ) 113 return [] 110 114 } 111 115 112 // Perform no synchronization if no studies have to be synchronized113 116 // Perform synchronization on only one study directly, because otherwise 114 117 // the getStudies method could throw a ResourceNotFoundException or NotAuthorizedException 115 118 // that can better be handled by synchronizeStudy 116 if( studies.size() == 0 ) { 117 return [] 118 } else if( studies.size() == 1 ) { 119 println "Study: " + studies[ 0] 119 if( studies.size() == 1 ) { 120 120 def newStudy = synchronizeStudy( studies[0] ); 121 121 if( newStudy )
Note: See TracChangeset
for help on using the changeset viewer.