Skip to content

Commit

Permalink
Fix regression in CollectionAgeLimitAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenBond committed Oct 20, 2023
1 parent bf0112d commit 59c1dcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Orleans.Core/Configuration/CollectionAgeLimitAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,22 @@ public CollectionAgeLimitAttribute() { }
/// <summary>
/// Gets or sets the number of days to delay collecting an idle activation for.
/// </summary>
public double Days { private get; init; }
public double Days { get; set; }

/// <summary>
/// Gets or sets the number of hours to delay collecting an idle activation for.
/// </summary>
public double Hours { private get; init; }
public double Hours { get; set; }

/// <summary>
/// Gets or sets the number of minutes to delay collecting an idle activation for.
/// </summary>
public double Minutes { private get; init; }
public double Minutes { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this grain should never be collected by the idle activation collector.
/// </summary>
public bool AlwaysActive { private get; init; }
public bool AlwaysActive { get; set; }

/// <summary>
/// Gets the idle activation collection age.
Expand Down
2 changes: 2 additions & 0 deletions test/Grains/TestInternalGrains/EchoTaskGrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class EchoTaskGrainState
}

[StorageProvider(ProviderName = "MemoryStore")]
[CollectionAgeLimit(Days = 1)] // Added to test the attribute itself.
public class EchoGrain : Grain<EchoTaskGrainState>, IEchoGrain
{
private readonly ILogger logger;
Expand Down Expand Up @@ -58,6 +59,7 @@ public Task<string> EchoError(string data)
}

[StorageProvider(ProviderName = "MemoryStore")]
[CollectionAgeLimit("01:00:00")] // Added to test the attribute itself.
internal class EchoTaskGrain : Grain<EchoTaskGrainState>, IEchoTaskGrain, IDebuggerHelperTestGrain
{
private readonly IInternalGrainFactory internalGrainFactory;
Expand Down

0 comments on commit 59c1dcd

Please sign in to comment.