Skip to content

Commit

Permalink
Setup new well distributed compaction cronjobs for couch
Browse files Browse the repository at this point in the history
  • Loading branch information
amaltaro committed May 16, 2014
1 parent 0ae5d75 commit 6370ab7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions couchdb/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ deploy_couchdb_post()
* )
enable
sysboot
local cmd="$project_config/manage compact all 'I did read documentation'"
$nogroups || cmd="sudo -H -u _couchdb bashs -l -c \"${cmd}\""
echo "12 0 * * * $cmd"
local hour=0
for action in "compact wmstats" "compact all_but_wmstats" \
"compactviews wmstats WMStats" "compactviews all_but_wmstats all"; do
local cmd="$project_config/manage $action 'I did read documentation'"
$nogroups || cmd="sudo -H -u _couchdb bashs -l -c \"${cmd}\""
echo "1 $hour * * * $cmd"
hour=$((hour+6))
done

# Daily backup the databases to other cluster machines
case $host in
Expand Down

0 comments on commit 6370ab7

Please sign in to comment.