payloadLifespan/payloadLifetime and other name variants unified to Time To Live naming.
All checks were successful
Build and Push Docker Image / build (push) Successful in 55s
Build and Push Docker Image / docker (push) Successful in 36s

This commit is contained in:
2025-07-05 17:07:53 +02:00
parent 85c462a614
commit a44912ac87
25 changed files with 496 additions and 25 deletions

View File

@ -31,7 +31,7 @@ namespace MessengerApi.Configuration.Model
/// <summary>
/// Message lifetime unless set differently in message body.
/// </summary>
public int DefaultMessageLifetimeInMinutes { get; set; }
public int DefaultMessageTimeToLiveInSeconds { get; set; }
/// <summary>
/// If true, messages are periodically wiped to free up space.
@ -72,7 +72,7 @@ namespace MessengerApi.Configuration.Model
this.Origins = origins ?? [];
this.Proxies = [];
this.RateLimitPerMinute = 120;
this.DefaultMessageLifetimeInMinutes = 1;
this.DefaultMessageTimeToLiveInSeconds = 60;
this.HousekeepingEnabled = true;
this.HousekeepingMessageAgeInMinutes = 120;
this.HousekeepingMessageState = HousekeepingMessageStates.None;
@ -85,7 +85,7 @@ namespace MessengerApi.Configuration.Model
{
Populate<string>(config, Env.PROXIES, x => this.Proxies = ProxiesParser.Parse(x));
Populate<int>(config, Env.QUERY_RATE_PER_MINUTE, x => this.RateLimitPerMinute = x);
Populate<int>(config, Env.DEFAULT_MESSAGE_LIFETIME_IN_MINUTES, x => this.DefaultMessageLifetimeInMinutes = x);
Populate<int>(config, Env.DEFAULT_MESSAGE_TIME_TO_LIVE_IN_SECONDS, x => this.DefaultMessageTimeToLiveInSeconds = x);
Populate<bool>(config, Env.HOUSEKEEPING_ENABLED, x => this.HousekeepingEnabled = x);
Populate<int>(config, Env.HOUSEKEEPING_MESSAGE_AGE_IN_MINUTES, x => this.HousekeepingMessageAgeInMinutes = x);
Populate<string>(config, Env.HOUSEKEEPING_MESSAGE_STATE, x => this.HousekeepingMessageState = HousekeepingMessageStateParser.Parse(x));