-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Provide method that can observe backup and restore (IObservable) #1039
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
Comments
Sounds interesting. I would like to implement this. |
Go for it @robertlyson :) Have a look at |
Everything was going well until I started implementing the configurable interval feature and now I'm stuck :)
So, do you have any advice how to do this part easily? Maybe I can't see something obvious. |
Great news :) Thread.Sleep is blocking on the calling thread so best to avoid that. This SO thread has some great usage patterns for using Another route to explore: Use Have you already pushed your work to your fork? |
Thanks for your tips @Mpdreamz :) I wrote tests in the way that blocking current thread wasn't a problem, so I'll change this and maybe solution will pop up. I guess I can't use Task.Delay, because support for this was added in .Net 4.5, and NEST solution is set for .Net 4.0. I haven't pushed code to my fork yet. |
…tic#1039 - general solution
I pushed branch with this feature, but it doesn't work properly yet. To obtain information about restore status I'm using Would be great if you can take a look on Don't know what is causing this issue, advice is much appreciated :) PS: |
It's going to be tricky writing a reliable integration tests, what might be best is to create a hefty index and restore it manually capturing the status requests in between and writing a unit test for it. The unit test and mocking is a bit involved I can totally understand if this is beyond your available free time :) You could open a PR with what you have at the moment (from glancing over github it looks very good so far!) and me or @gmarz could work on adding the tests for it as part of our PS: Just offering to unload some work from you by the way, if you feel up for doing the mocking and testing as part of our unit tests let me know I'll gladly pair with you here over skype/hangouts 👍 |
Closing this since @robertlyson implemented this as per #1115 ! 👍 |
Much like the
ReIndex()
today it would be nice if we expose methods that encapsulates monitoring a backup and restore operation by exposing an IObservable that can report back on status (configurable interval), complete and errors.The text was updated successfully, but these errors were encountered: