summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2013-03-13 01:47:34 -0500
committerPaul J. Davis <paul.joseph.davis@gmail.com>2013-03-20 06:02:55 -0500
commit6e53c8a7ee5a7f70a7492baf23c1aa383f7c5843 (patch)
tree51c2031005e506bf3c57313ca7b418522826db3c /share
parent19bab5cb573a6db0c5a120359f1bd490d60a690e (diff)
downloadcouchdb-6e53c8a7ee5a7f70a7492baf23c1aa383f7c5843.tar.gz
Add a config:reload/0 and HTTP trigger
Theoretically this should prevent all of those annoying test suite failures when a test fails in with a temporary config set and fails to undo its changes. This works by storing the list of INI files in the config server and on command will clear its ets table and re-read data from disk thus clearing its cache of non-persisted values. Obviously this isn't something that should be relied on in production settings.
Diffstat (limited to 'share')
-rw-r--r--share/www/script/couch.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js
index 3deb44102..58ad7a7c2 100644
--- a/share/www/script/couch.js
+++ b/share/www/script/couch.js
@@ -356,6 +356,12 @@ CouchDB.getVersion = function() {
return JSON.parse(CouchDB.last_req.responseText).version;
};
+CouchDB.reloadConfig = function() {
+ CouchDB.last_req = CouchDB.request("POST", "/_config/_reload");
+ CouchDB.maybeThrowError(CouchDB.last_req);
+ return JSON.parse(CouchDB.last_req.responseText);
+};
+
CouchDB.replicate = function(source, target, rep_options) {
rep_options = rep_options || {};
var headers = rep_options.headers || {};