fix(purge): short first tick on all three purge timers so daily-recycled nodes still purge
This commit is contained in:
@@ -5,6 +5,7 @@ using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using ZB.MOM.WW.ScadaBridge.AuditLog.Configuration;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Types;
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.AuditLog.Central;
|
||||
|
||||
@@ -93,7 +94,10 @@ public class AuditLogPurgeActor : ReceiveActor
|
||||
base.PreStart();
|
||||
var interval = _purgeOptions.Interval;
|
||||
_timer = Context.System.Scheduler.ScheduleTellRepeatedlyCancelable(
|
||||
initialDelay: interval,
|
||||
// Short first tick (min(interval, 5min)): purges are idempotent, and using the
|
||||
// full interval as the initial delay meant a daily-recycled node never purged
|
||||
// (arch-review 04, S9). Fast test cadences (interval < 5min) are unchanged.
|
||||
initialDelay: PurgeTimerSchedule.InitialDelay(interval),
|
||||
interval: interval,
|
||||
receiver: Self,
|
||||
message: PurgeTick.Instance,
|
||||
|
||||
Reference in New Issue
Block a user