Skip to content

Commit e84ee87

Browse files
committed
add actuator beans;
add travis-ci build status to README.md
1 parent 07f8abd commit e84ee87

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# mongogee
22
MongoDB data migration Grails Plugin.
33

4-
4+
TravisCI status on master branch: https://travis-ci.org/ikaliZpet/mongogee.svg?branch=master
55

66
## INTRODUCTION
77

mongogee/grails-app/services/grails/plugin/mongogee/MongogeeService.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class MongogeeService {
101101

102102
ChangeEntry existingChangeEntry = ChangeEntry.findByChangeSetId(changeEntry.changeSetId)
103103

104+
//todo: try-catch the invocation so the error/exp msg can be saved to changeEntryLog domain record
105+
104106
if (!existingChangeEntry) {
105107
log.info "applying new changeSet: $changeEntry"
106108
invokeChangeSetMethod(changeSetMethod, changeLogInstance)

test-mongogee/grails-app/conf/application.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ spring:
1818
template:
1919
check-template-location: false
2020

21-
# Spring Actuator Endpoints are Disabled by Default
21+
# Spring Actuator Endpoints are enabled in development env
22+
environments:
23+
development:
24+
endpoints:
25+
enabled: true
2226
endpoints:
2327
enabled: false
2428
jmx:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
import org.springframework.boot.actuate.health.DataSourceHealthIndicator
2+
import org.springframework.boot.actuate.health.DiskSpaceHealthIndicatorProperties
3+
import org.springframework.boot.actuate.health.MongoHealthIndicator
4+
15
// Place your Spring DSL code here
26
beans = {
7+
8+
// ** spring boot actuator health check indicators ** //
9+
10+
databaseHealthCheck(DataSourceHealthIndicator, dataSource)
11+
12+
diskSpaceHealthIndicatorProperties(DiskSpaceHealthIndicatorProperties) {
13+
threshold = 250 * 1024 * 1024
14+
}
15+
16+
mongoHealthIndicator(MongoHealthIndicator)
17+
18+
319
}

0 commit comments

Comments
 (0)