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

Watcher cannot specify starting revision. #77

Closed
mikedoug opened this issue May 29, 2018 · 1 comment
Closed

Watcher cannot specify starting revision. #77

mikedoug opened this issue May 29, 2018 · 1 comment

Comments

@mikedoug
Copy link

This is keenly important to avoid having to use locking. This is trivial to fix in WatchBuilder class by adding something like this to it:

public fromRevision(revision: string, increment: number) {
    this.request.start_revision = new BigNumber(revision).add(increment).toString();
    return this;
}

The revision I am passing in here is from a previous call to get all of the keys under a prefix. I want to be able to tell it to use that revision plus one (hence the increment). I'm not sure if that is a string or whatnot. I would have done a pull request myself, but I've not dabbled in Typescript, and when I tried to run the tests unmodified they blew up on me.

@connor4312
Copy link
Member

This has been added and published in 0.2.12. Thanks for your suggestion!

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

No branches or pull requests

2 participants