-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
3.3.0-rc-3 => Elsa.Retention.Options: Missing SweepInterval #6194
Comments
Hello @r-kernberger, I have observed the same at the Elsa 3.3.0 RC3.
|
Did you define a delete policy like this:
The DeleteFilter could look like this public class DeleteFilter : RetentionWorkflowInstanceFilter
{
//Finished Workflows
public DeleteFilter()
{
WorkflowStatus = Elsa.Workflows.WorkflowStatus.Finished;
}
} Update: |
Yes, it is the same from myside too. The following i have configured.
}); |
I've made a PR: #6208 to add the SweepInterval. Not sure why it's not deleting, I will try to replicate and fix it over the weekend. |
I've tested with a simple writeline workflow but seems to work as expected. My setup: elsa.UseRetention(r =>
{
r.SweepInterval = TimeSpan.FromSeconds(30);
r.AddDeletePolicy("Delete all finished workflows", _ => new RetentionWorkflowInstanceFilter()
{
WorkflowStatus = WorkflowStatus.Finished
});
}); Output:
Note: I did notice the minum sweep interval is 1 minute, settings 30 seconds will still result in one sweep per minute. |
Hello @Sverre-W , Thank you very much!
I think the Sweep Interval is considering the minute to delete the finished instances but not considered the configured as above. Step1: Local time is 6:20 - I have 9 instances with finished state Step2 : At 6:24 - Deleted the all above instances. Is it something missing in the configuration to work as expected? |
@Sverre-W @r-kernberger did you tried the scenario which I have highlighted at your side? because to ensure that Retention options is working as expected. |
In the class Elsa.Retention.Options.CleanupOptions of package Retention, there is missing an important setting, which has been available in prior versions of the retention module
=> SweepInterval
With this settting it has been possible to define how often the Retention Job is running (every x days, hours, minutes).
Now with this settings missing, there is the default value of every 4 hours. Which is especially for development / testing not good.
Will this setting be available in v3.3? Has this been removed on purpose?
The text was updated successfully, but these errors were encountered: