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