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

Method onComplete

lib/index.js:2414–2428  ·  view source on GitHub ↗
(resp)

Source from the content-addressed store, hash-verified

2412 callback(err);
2413 };
2414 const onComplete = (resp) => {
2415 var lastSeq = resp.last_seq;
2416 Promise.all(promises).then(() => {
2417 return upsert(this, '_local/compaction', (doc) => {
2418 if (!doc.last_seq || doc.last_seq < lastSeq) {
2419 doc.last_seq = lastSeq;
2420 return doc;
2421 }
2422 return false; // somebody else got here first, don't update
2423 });
2424 }).then(() => {
2425 this.activeTasks.remove(taskId);
2426 callback(null, {ok: true});
2427 }).catch(onError);
2428 };
2429
2430 this.info().then((info) => {
2431 taskId = this.activeTasks.add({

Callers

nothing calls this directly

Calls 2

upsertFunction · 0.70
removeMethod · 0.45

Tested by

no test coverage detected