MCPcopy Index your code
hub / github.com/apache/pouchdb / ping

Function ping

lib/index-browser.js:6986–6997  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6984 await fetchJSON(genDBUrl(host, '_compact'), {method: 'POST'});
6985
6986 function ping() {
6987 api.info(function (err, res) {
6988 // CouchDB may send a "compact_running:true" if it's
6989 // already compacting. PouchDB Server doesn't.
6990 /* istanbul ignore else */
6991 if (res && !res.compact_running) {
6992 callback(null, {ok: true});
6993 } else {
6994 setTimeout(ping, opts.interval || 200);
6995 }
6996 });
6997 }
6998 // Ping the http if it's finished compaction
6999 ping();
7000 });

Callers 1

HttpPouchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…