Merge lp:~abentley/charms/precise/charmworld/sync-index into lp:~juju-jitsu/charms/precise/charmworld/trunk

Proposed by Aaron Bentley
Status: Merged
Approved by: Aaron Bentley
Approved revision: 70
Merged at revision: 70
Proposed branch: lp:~abentley/charms/precise/charmworld/sync-index
Merge into: lp:~juju-jitsu/charms/precise/charmworld/trunk
Diff against target: 20 lines (+4/-1)
2 files modified
hooks/config-changed (+3/-0)
revision (+1/-1)
To merge this branch: bzr merge lp:~abentley/charms/precise/charmworld/sync-index
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+161446@code.launchpad.net

Commit message

Sync mongo to Elasticsearch on initial connection.

Description of the change

This branch updates ensures that elasticsearch is initially populated from mongo.

When both mongo and elasticsearch are both present for the first time, config-changed will run sync-index, which copies from mongo to elasticsearch.

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/config-changed'
2--- hooks/config-changed 2013-04-16 15:48:55 +0000
3+++ hooks/config-changed 2013-04-29 15:44:46 +0000
4@@ -118,6 +118,9 @@
5 fi
6
7 if [ $could_ingest == 'false' ]; then
8+ juju-log "Syncing database to index."
9+ su charmworld -c "INI=$CONFIG_FILE HOME=$charmworld_home \
10+ $project_dir/bin/sync-index"
11 juju-log "Hey, we're ingesting over here. This WILL take a while."
12 # Perform an initial ingest
13 su charmworld -c "INI=$CONFIG_FILE HOME=$charmworld_home \
14
15=== modified file 'revision'
16--- revision 2013-04-24 16:03:22 +0000
17+++ revision 2013-04-29 15:44:46 +0000
18@@ -1,1 +1,1 @@
19-39
20+40

Subscribers

People subscribed via source and target branches

to all changes: