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

Replication alive$ #809

Merged
merged 5 commits into from
Sep 18, 2018
Merged

Replication alive$ #809

merged 5 commits into from
Sep 18, 2018

Conversation

rafamel
Copy link
Contributor

@rafamel rafamel commented Sep 17, 2018

Adds alive$

Relates to #763

@pubkey
Copy link
Owner

pubkey commented Sep 17, 2018

Looks good.
Can you remove the dist-file dist/lib/plugins/replication.js from the PR?

@rafamel
Copy link
Contributor Author

rafamel commented Sep 18, 2018

This is done. As a curiosity, why do we have dist files in the git repo? Wouldn't it make sense to include it in the .gitignore?

@pubkey
Copy link
Owner

pubkey commented Sep 18, 2018

They are commited so people can try the latest version without having to do a build.
https://pubkey.github.io/rxdb/install.html#latest

Emits `true` or `false` depending if the replication is alive - data is transmitting properly between databases. A `false` value implies the connection has died -if you're replicating to a remote database, for example. It will only emit `false` if there are pending changes that couldn't be replicated -it won't emit immediately after the connection dies.

```js
replicationState.active$.subscribe(active => console.dir(active));
Copy link

@motin motin Sep 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: active -> alive

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @motin ! Solved

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rafamel Great, but you missed the last of the three active instances

@pubkey pubkey merged commit 193ae06 into pubkey:8.0.0 Sep 18, 2018
pubkey added a commit that referenced this pull request Sep 18, 2018
Emits `true` or `false` depending if the replication is alive - data is transmitting properly between databases. A `false` value implies the connection has died -if you're replicating to a remote database, for example. It will only emit `false` if there are pending changes that couldn't be replicated -it won't emit immediately after the connection dies.

```js
replicationState.alive$.subscribe(alive => console.dir(active));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: console.dir(active) -> console.dir(alive)

@@ -59,6 +59,13 @@ Emits `true` or `false` depending if the replication is transmitting data. A `fa
replicationState.active$.subscribe(active => console.dir(active));
```

### alive$
Emits `true` or `false` depending if the replication is alive - data is transmitting properly between databases. A `false` value implies the connection has died -if you're replicating to a remote database, for example. It will only emit `false` if there are pending changes that couldn't be replicated -it won't emit immediately after the connection dies.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: missing spaces after the dashes in "-if" and "-it"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a native Spanish speaker; in Spanish dashes go without inner spaces. Is that not the case for English?

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.

None yet

3 participants