Skip to content

fix(server): wait before closing pubsub database connection

Tamlyn Rhodes requested to merge pubsub-destroy into master
  • Add drain parameter to destroy function to optionally await the drain event on the pubsub database client before calling end. Otherwise you can close the connection before all messages have been delivered which causes errors. I've made it optional because the drain event is not emitted if no query was issued. I couldn't think of a way to automatically detect whether it should wait or not so I left it up to the consumer to specify.
  • Expose manager on pubsweet-server package root.

Merge request reports