Changeset 616

Show
Ignore:
Timestamp:
25-06-10 12:01:07 (4 years ago)
Author:
duh
Message:

- seperated production bootstrapping from development bootstrapping

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r571 r616  
    1717 */ 
    1818class BootStrap { 
    19         def init = {servletContext -> 
     19        def init = { servletContext -> 
    2020                // define timezone 
    2121                System.setProperty('user.timezone', 'CET') 
    2222 
    23                 // we could also check if we are in development by GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT 
    24                 if (Study.count() == 0 && false) { 
    25                         println ".development bootstrapping..."; 
     23                // production bootstrapping 
     24                if (GrailsUtil.environment == "production" && Template.count() == 0) { 
     25                        println ".production bootstrapping..." 
     26 
     27                        // TODO, initial application templates, terms and ontologies 
     28                } 
     29 
     30                // development bootstrapping 
     31                if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT && Study.count() == 0 && false) { 
     32                        println ".development bootstrapping..." 
    2633 
    2734                        // add Subject>species ontology