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

Function ping

lib/index.es.js:6971–6982  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

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…