Change to run once an hour, after 6 hours, and to clean 6-hour jobs

This commit is contained in:
2024-04-04 13:50:20 -05:00
parent 0759085431
commit a784e59c50

View File

@ -46,8 +46,9 @@ public class InMemoryStateProvider implements StateProviderInterface
private final Map<AbstractStateKey, Object> map;
private int jobPeriodSeconds = 60 * 15;
private int jobInitialDelay = 60 * 60 * 4;
private static int jobPeriodSeconds = 60 * 60; // 1 hour
private static int cleanHours = 6;
private static int jobInitialDelay = 60 * 60 * cleanHours;
@ -84,7 +85,7 @@ public class InMemoryStateProvider implements StateProviderInterface
{
try
{
Instant cleanTime = Instant.now().minus(4, ChronoUnit.HOURS);
Instant cleanTime = Instant.now().minus(cleanHours, ChronoUnit.HOURS);
getInstance().clean(cleanTime);
}
catch(Exception e)