Comments (5)
Isn't what you are looking for simply injecting the DurableTaskClient
and then calling PurgeInstanceAsync
, PurgeInstancesAsync
or PurgeAllInstancesAsync
like this:
[Function("TerminateSomething")]
public async Task<HttpResponseData> Run([DurableClient] DurableTaskClient client)
{
await client.PurgeInstanceAsync("SomeInstanceId");
}
It is what we are using to clean-up, and it works in general, except for the yet to be triaged problem mentioned here #143 (comment)
from durabletask-dotnet.
Isn't what you are looking for simply injecting the
DurableTaskClient
and then callingPurgeInstanceAsync
,PurgeInstancesAsync
orPurgeAllInstancesAsync
like this:[Function("TerminateSomething")] public async Task<HttpResponseData> Run([DurableClient] DurableTaskClient client) { await client.PurgeInstanceAsync("SomeInstanceId"); }
It is what we are using to clean-up, and it works in general, except for the yet to be triaged problem mentioned here #143 (comment)
Won't that purge the instance table and not history table (or perhaps both)? What I want to do is remove history but not instances.
from durabletask-dotnet.
From what I can gather, it does both. There are no other operations.
from durabletask-dotnet.
@viktoraandersson: can you tell me a bit more about your use case? Why are you trying to delete only the instance table and not the history table.
Also, I believe the purgeInstanceAsync API in the isolated SDK has the same side effects as the in-process SDK. I don't believe we've changed the semantics here.
from durabletask-dotnet.
@viktoraandersson: can you tell me a bit more about your use case? Why are you trying to delete only the instance table and not the history table.
Also, I believe the purgeInstanceAsync API in the isolated SDK has the same side effects as the in-process SDK. I don't believe we've changed the semantics here.
Sure! It's the other way around though, I want to delete history and not instance table.
The use case:
I have IOT devices which gets setup by the durable function. Each device has a unique ID, and I use this ID as instance ID for the durable function. This way I can make sure only one setup is running per device. I can use DurableTaskClient.GetInstancesAsync to get some metadata and e.g. determine if someone is already running setup for this device.
Because of this I want to keep the data in the instance table. I want to purge instance history though as this can otherwise grow infinitely.
Am I misunderstanding something perhaps? Which tables are purged with IDurableOrchestrationClient .PurgeInstanceHistoryAsync and which are purged with DurableTaskClient.PurgeInstanceAsync? Or am I abusing the use of the instance ID in my use case somehow?
from durabletask-dotnet.
Related Issues (20)
- Durable Task: Activity Exception thrown as an unhandled exception HOT 3
- Support Cascade Terminate/Purge
- Entities: Make `InitializeState` support Async operations HOT 4
- Unit Testing Isolated Model Azure Durable Function Orchestrator in .Net 8 HOT 6
- PurgeInstancesAsync fails after 100 seconds
- Class syntax example doesn't work HOT 2
- PurgeAllInstancesAsync Fails with Exception when there are no instances to Purge from PurgeFilter HOT 1
- Listing instances with DurableTaskClient.GetAllInstancesAsync() is more than twice as slower than with IDurableOrchestrationClient.ListInstancesAsync() HOT 4
- Durable functions hubname cannot be configured from app settings HOT 1
- WaitForExternalEvent<T>(eventName, timespan, cancellationToken) not supported (anymore?) in isolated mode
- Ability to Set Both RetryPolicy? Policy and AsyncRetryHandler? Handler in TaskRetryOptions HOT 9
- (De)serialize `State` property when using `TaskEntity<TState>`-based implementation not working (correctly) HOT 7
- DurableTaskClient.PurgeAllInstancesAsync: NotSupportedException and RpcException for .net 8 isolated HOT 11
- Roslyn Analyzer: System.TimeProvider
- Roslyn Analyzer: document how orchestrations are analyzed and the method probing is executed.
- The filter passed to _PurgeAllInstancesAsync(PurgeInstancesFilter filter, CancellationToken cancellation)_ on the DurableTaskClient, is not used, instead a new instance is created HOT 1
- Any documentation on how to build the project? HOT 1
- RaiseEventAsync with a given taskhubname is missing compared to in process HOT 4
- Investigate state sharing between different Roslyn analyzers
- RpcException - PurgeAllInstancesAsync operation was canceled - HttpClient.Timeout of 100 seconds elapsing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from durabletask-dotnet.