()
| 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 | }); |
no outgoing calls
no test coverage detected
searching dependent graphs…