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

Function ping

lib/index.js:6976–6987  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6974 await fetchJSON(genDBUrl(host, '_compact'), {method: 'POST'});
6975
6976 function ping() {
6977 api.info(function (err, res$$1) {
6978 // CouchDB may send a "compact_running:true" if it's
6979 // already compacting. PouchDB Server doesn't.
6980 /* istanbul ignore else */
6981 if (res$$1 && !res$$1.compact_running) {
6982 callback(null, {ok: true});
6983 } else {
6984 setTimeout(ping, opts.interval || 200);
6985 }
6986 });
6987 }
6988 // Ping the http if it's finished compaction
6989 ping();
6990 });

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…