26 lines
931 B
C#
26 lines
931 B
C#
namespace w4c_workflows.Services.Quota;
|
|
|
|
/// <summary>
|
|
/// Per-tenant workflow execution quota. Bound from the <c>Workflows:Quota</c>
|
|
/// configuration section. A "run" is one top-level execution (manual, resume,
|
|
/// cron/interval, webhook or handler event); sub-workflow child runs are part of
|
|
/// their parent execution and do not consume quota.
|
|
/// </summary>
|
|
public sealed class WorkflowQuotaOptions
|
|
{
|
|
public const string SectionName = "Workflows:Quota";
|
|
|
|
/// <summary>
|
|
/// Master switch. When false, usage is still counted and reported, but a run
|
|
/// is never rejected (useful for platform/self-hosted deployments that meter
|
|
/// without enforcing).
|
|
/// </summary>
|
|
public bool Enforced { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Executions allowed per calendar month per tenant. Zero or negative means
|
|
/// unlimited.
|
|
/// </summary>
|
|
public long RunsPerMonth { get; set; } = 1000;
|
|
}
|