payloadLifespan/payloadLifetime and other name variants unified to Time To Live naming.
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>disable</Nullable>
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
public const string CORS_ORIGINS = nameof(CORS_ORIGINS);
|
||||
public const string PROXIES = nameof(PROXIES);
|
||||
public const string QUERY_RATE_PER_MINUTE = nameof(QUERY_RATE_PER_MINUTE);
|
||||
public const string DEFAULT_MESSAGE_LIFETIME_IN_MINUTES = nameof(DEFAULT_MESSAGE_LIFETIME_IN_MINUTES);
|
||||
public const string DEFAULT_MESSAGE_TIME_TO_LIVE_IN_SECONDS = nameof(DEFAULT_MESSAGE_TIME_TO_LIVE_IN_SECONDS);
|
||||
public const string HOUSEKEEPING_ENABLED = nameof(HOUSEKEEPING_ENABLED);
|
||||
public const string HOUSEKEEPING_MESSAGE_AGE_IN_MINUTES = nameof(HOUSEKEEPING_MESSAGE_AGE_IN_MINUTES);
|
||||
public const string HOUSEKEEPING_MESSAGE_STATE = nameof(HOUSEKEEPING_MESSAGE_STATE);
|
||||
|
||||
Reference in New Issue
Block a user