more consistent variables
parent
da08be0285
commit
efed1ce04f
|
|
@ -1304,11 +1304,10 @@
|
|||
sync()
|
||||
{
|
||||
console.log("syncing to replicas: " + this.pendingSyncCount());
|
||||
this.deltas.popEach((k) => {
|
||||
console.log("syncing to replicas: " + k);
|
||||
this.replicate(k);
|
||||
this.deltas.popEach((key) => {
|
||||
console.log("syncing to replicas: " + key);
|
||||
this.replicate(key);
|
||||
});
|
||||
console.log("synced to replicas: " + this.pendingSyncCount());
|
||||
this.writePendingSyncCount();
|
||||
}
|
||||
|
||||
|
|
@ -1326,14 +1325,14 @@
|
|||
document.getElementById("pending").innerHTML = s;
|
||||
}
|
||||
|
||||
replicate(k)
|
||||
replicate(key)
|
||||
{
|
||||
var v = this.primary().get(k);
|
||||
var value = this.primary().get(key);
|
||||
this.replicas().forEach((database) => {
|
||||
if (v)
|
||||
database.set(k, v);
|
||||
if (value)
|
||||
database.set(key, value);
|
||||
else
|
||||
database.del(k, v);
|
||||
database.del(key, value);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue