forked from danielgerlag/workflow-core
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement batching for WorkflowsPurger (#22)
Implement batching for WorkflowsPurger --------- Co-authored-by: Viktor Shevchenko <viktor.shevchenko@idealscorp.com>
- Loading branch information
1 parent
f04ba30
commit f70b43c
Showing
7 changed files
with
66 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
|
||
namespace WorkflowCore.Models | ||
{ | ||
public class WorkflowsPurgerOptions | ||
{ | ||
public int BatchSize { get; } = 100; | ||
public int DeleteCommandTimeoutSeconds { get; } = 120; | ||
|
||
public WorkflowsPurgerOptions(int batchSize, int deleteCommandTimeoutSeconds = 120) | ||
{ | ||
if (batchSize < 0) | ||
throw new ArgumentOutOfRangeException("Batch size shoud be greater than 0"); | ||
|
||
if (deleteCommandTimeoutSeconds < 0) | ||
throw new ArgumentOutOfRangeException("Timeout shoud be greater than 0"); | ||
|
||
BatchSize = batchSize; | ||
DeleteCommandTimeoutSeconds = deleteCommandTimeoutSeconds; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters