Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing daemons to stop #418

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

qevni
Copy link

@qevni qevni commented Jan 4, 2020

Couple of issues which made it very hard to stop and start an express-pouchdb server with active replications in defined in a _replicator document.

  • in replicator.js, the db variable was never set, so undefined for db.stopReplicatorDaemon
  • callAsyncRecursive typically stops on the first daemon, since it doesn't have a stop method, and thus func[0] === undefined
  • The promises set up after replication completion in pouchch-replication fire up right after the daemon gets shut down, and throw exceptions on missing db within dbData.dbs which is empty, when trying to clean up the replication (which already has been cleaned when shutting the daemon down).
    Open to better ways to do this. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant