Closed glynnbird closed 6 years ago
When a question is assigned, a new document is added to the events PouchDB database, like so:
events
{ "_id": "53f6bd4f-849e-46d8-b7e5-d41923dc22fe", "_rev": "1-4ed835465fa844baa1ee5a5680f4f742", "type": "assigned", "assigned_by": "U7844223OL", "assigned_by_name": "stevie.smith", "assigned_at": "2018-02-08T08:53:58.518Z", "assigned_to": "U0Z2VN3EU", "assigned_to_name": "glynn.bird", "notified": false }
PouchDB is then instructed to replicate to the remote Cloudant events database as a one-off operation.
To test:
eventsdb.allDocs({include_docs:true}).then(console.log)
events sync complete {ok: true, start_time: Thu Feb 08 2018 08:53:58 GMT+0000 (GMT), docs_read: 1, docs_written: 1, doc_write_failures: 0, …}
sure. That should be easy enough
When a question is assigned, a new document is added to the
events
PouchDB database, like so:PouchDB is then instructed to replicate to the remote Cloudant
events
database as a one-off operation.To test:
events
database on the Cloudant side see issue #108eventsdb.allDocs({include_docs:true}).then(console.log)
events sync complete {ok: true, start_time: Thu Feb 08 2018 08:53:58 GMT+0000 (GMT), docs_read: 1, docs_written: 1, doc_write_failures: 0, …}
events
database to see if the document arrived