-
Notifications
You must be signed in to change notification settings - Fork 137
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
RDoc-2537 Add operation.Kill + WaitForCompletion overload #1736
Conversation
Operation operation = documentStore.Operations.Send(deleteByQueryOp); | ||
|
||
// Call 'Kill' to abort operation | ||
operation.Kill(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I didn't add the following assertion because of RavenDB-21875
// Assert that operation is no longer running
Assert.Throws<TaskCanceledException>(() => operation.WaitForCompletion(TimeSpan.FromMinutes(1)));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can keep pinging by GetOperationStateOperation
until the progress stats is changed
Related issue:
https://issues.hibernatingrhinos.com/issue/RDoc-2537/Add-operation.Kill-WaitForCompletion-overload
C#:
operation.kill
operation.WaitForCompletion
with cancellation tokenNode.js:
operation.kill