Couchdb buckDB.sync()激发';完成';但是具有相同选项的backdb.replicate.from()仅激发';暂停';-为什么?
使用Couchdb buckDB.sync()激发';完成';但是具有相同选项的backdb.replicate.from()仅激发';暂停';-为什么?,couchdb,pouchdb,Couchdb,Pouchdb,使用local.replicate.from(remote)进行复制时,不会触发任何complete事件,只有已暂停{live:false} 根据文档,当live设置为false时,我应该得到一个complete事件。我在CouchDB服务器日志中没有看到任何我识别为错误的内容 我使用的是邮袋浏览器6.4.3 本地数据库选项: { size: '1000', adapter: 'idb', auto_compaction: true, revs_limit: 1
local.replicate.from(remote)
进行复制时,不会触发任何complete
事件,只有已暂停
<正在指定代码>{live:false}
根据文档,当live
设置为false
时,我应该得到一个complete
事件。我在CouchDB服务器日志中没有看到任何我识别为错误的内容
我使用的是邮袋浏览器
6.4.3
本地数据库选项:
{
size: '1000',
adapter: 'idb',
auto_compaction: true,
revs_limit: 1
}
“拉动”代码:
这会很好地拉下所有远程记录,只是没有完成
事件,只有暂停
。好像指定了live:true
这是我的同步代码-它总是触发一个complete
事件。remote
变量中的pookDB实例是一个配置为使用代理身份验证的CouchDB服务器-此身份验证似乎工作正常
双向复制代码:
local.sync(remote, {
live: false,
batch_size: 50,
batches_limit: 2,
timeout: 5000,
})
.on('change', this.onChange.bind(this))
.on('paused', this.onPause.bind(this))
.on('active', this.onActive.bind(this))
.on('denied', this.onDenied.bind(this))
.on('complete', this.onComplete.bind(this))
.on('error', this.onError.bind(this))
.catch(this.handleError.bind(this));
sync()方法总是触发一个complete
事件,正如我对live:false
所期望的那样local.replicate.from()
从不这样做
你知道为什么我在这两种情况下都没有得到完整的事件吗
local.sync(remote, {
live: false,
batch_size: 50,
batches_limit: 2,
timeout: 5000,
})
.on('change', this.onChange.bind(this))
.on('paused', this.onPause.bind(this))
.on('active', this.onActive.bind(this))
.on('denied', this.onDenied.bind(this))
.on('complete', this.onComplete.bind(this))
.on('error', this.onError.bind(this))
.catch(this.handleError.bind(this));