diff --git a/src/collection-layer.ts b/src/collection-layer.ts index 62ced8b..a9bb8ea 100644 --- a/src/collection-layer.ts +++ b/src/collection-layer.ts @@ -66,7 +66,6 @@ export class Collection { eventType = 'create'; } const deltaBulider = new EntityPropertiesDeltaBuilder(entityId); - console.log('deltaBulider -->', deltaBulider.delta); if (!properties) { // Let's interpret this as entity deletion @@ -125,7 +124,6 @@ export class Collection { applyDelta(delta: Delta) { // TODO: handle delta representing entity deletion - console.log('applying delta:', delta); const idPtr = delta.pointers.find(({localContext}) => localContext === 'id'); if (!idPtr) { console.error('encountered delta with no entity id', delta); diff --git a/src/example-app.ts b/src/example-app.ts index f996862..26860dd 100644 --- a/src/example-app.ts +++ b/src/example-app.ts @@ -47,9 +47,7 @@ class Users { } (async () => { - console.log('1'); const users = new Users(); - console.log('2'); const app = express() app.get("/ids", (req: express.Request, res: express.Response) => { @@ -94,11 +92,8 @@ class Users { }); } - console.log('3'); await bindPublish(); - console.log('3a'); await bindReply(); - console.log('3b'); runDeltas(); runRequestHandlers(); await new Promise((resolve) => setTimeout(resolve, 500)); @@ -107,7 +102,6 @@ class Users { askAllPeersForDeltas(); await new Promise((resolve) => setTimeout(resolve, 1000)); - console.log('4'); const taliesin = users.upsert({ // id: 'taliesin-1', name: 'Taliesin', diff --git a/src/peers.ts b/src/peers.ts index 00c5c3e..d26d1b5 100644 --- a/src/peers.ts +++ b/src/peers.ts @@ -80,13 +80,11 @@ export async function askAllPeersForDeltas() { peers.forEach(async (peer, idx) => { console.log(`Asking peer ${idx} for deltas`); const deltas = await peer.askForDeltas(); - console.log('received deltas:', deltas); + console.log(`received ${deltas.length}`); for (const delta of deltas) { delta.receivedFrom = peer.reqAddr; receiveDelta(delta); } - console.log('deltasProposed count', deltasProposed.length); - console.log('deltasAccepted count', deltasAccepted.length); ingestAll(); }); } diff --git a/src/pub-sub.ts b/src/pub-sub.ts index e675044..7fa0d6d 100644 --- a/src/pub-sub.ts +++ b/src/pub-sub.ts @@ -7,7 +7,6 @@ export const subscribeSock = new Subscriber(); export async function bindPublish() { const addrStr = `tcp://${PUBLISH_BIND_ADDR}:${PUBLISH_BIND_PORT}`; - console.log('addrStr:', addrStr); await publishSock.bind(addrStr); console.log(`Publishing socket bound to ${addrStr}`); }