feature: Prometheus Metrics, Supervisor Dashboard, and Promotion Retry Job

This commit is contained in:
voltsrage
2026-06-27 13:29:04 +08:00
parent e22d33b654
commit 04bdb7e85c
31 changed files with 4482 additions and 259 deletions
@@ -0,0 +1,38 @@
/// <summary>
/// Configuration for the promotion retry background job.
/// All values configurable via appsettings.json under "PromotionRetry".
/// </summary>
public class PromotionRetryOptions
{
public const string Section = "PromotionRetry";
/// <summary>
/// How often the retry service checks for stuck batches (in seconds).
/// Default: 60 seconds.
/// </summary>
public int PollIntervalSeconds { get; set; } = 60;
/// <summary>
/// Initial delay before the first retry attempt (in seconds).
/// Default: 30 seconds.
/// </summary>
public int InitialDelaySeconds { get; set; } = 30;
/// <summary>
/// Maximum delay between retries (in seconds). Exponential backoff
/// caps at this value. Default: 900 seconds (15 minutes).
/// </summary>
public int MaxDelaySeconds { get; set; } = 900;
/// <summary>
/// Maximum number of retry attempts before the batch is flagged
/// for manual intervention. Default: 10.
/// </summary>
public int MaxRetryAttempts { get; set; } = 10;
/// <summary>
/// Backoff multiplier. Each retry delay is multiplied by this value.
/// Default: 2.0 (doubles each time).
/// </summary>
public double BackoffMultiplier { get; set; } = 2.0;
}