Last change
on this file since 613 was
571,
checked in by gav, 14 years ago
|
Start lucene mirroring and index after creating bootstrap data.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[149] | 1 | class BootStrap |
---|
[58] | 2 | { |
---|
[149] | 3 | def createDataService |
---|
[58] | 4 | |
---|
| 5 | def init = { servletContext -> |
---|
| 6 | |
---|
[504] | 7 | /** Environment specific settings. |
---|
| 8 | * Note that (circa grails-1.2.2) if running "test test-app integration:" from "grails interactive" |
---|
| 9 | * the correct environment is applied for DataSource and Config, |
---|
| 10 | * but for BootStrap (and others) the development environment is applied. |
---|
| 11 | */ |
---|
| 12 | environments { |
---|
| 13 | development { |
---|
| 14 | log.info "Starting DEVELOPMENT bootstrap." |
---|
| 15 | createDataService.ensureSystemAndAdminAccess() |
---|
| 16 | createDataService.createBaseData() |
---|
| 17 | createDataService.createDemoData() |
---|
[571] | 18 | createDataService.startLucene() |
---|
[504] | 19 | } |
---|
| 20 | test { |
---|
| 21 | log.info "Starting TEST bootstrap." |
---|
| 22 | createDataService.ensureSystemAndAdminAccess() |
---|
[508] | 23 | createDataService.createBaseData() |
---|
[571] | 24 | createDataService.startLucene(false) |
---|
[504] | 25 | } |
---|
| 26 | production { |
---|
| 27 | log.info "Starting PRODUCTION bootstrap." |
---|
| 28 | createDataService.ensureSystemAndAdminAccess() |
---|
[508] | 29 | createDataService.createBaseData() |
---|
[571] | 30 | createDataService.startLucene() |
---|
[504] | 31 | } |
---|
[58] | 32 | } |
---|
[149] | 33 | |
---|
[504] | 34 | } // init |
---|
[58] | 35 | |
---|
| 36 | def destroy = { |
---|
| 37 | } |
---|
[504] | 38 | |
---|
| 39 | } // end class |
---|
Note: See
TracBrowser
for help on using the repository browser.