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