refactor : supporting feature where sleeptime changes due to a meeting.

This commit is contained in:
Laura Gomez
2020-06-18 17:25:17 -04:00
committed by Chris Cameron
parent 878784586f
commit e093a57172

View File

@@ -25,11 +25,10 @@ namespace ICD.Common.Utils.Services.Scheduler
public void Run() public void Run()
{ {
RunFinal(); NextRunTimeUtc = RunFinal();
NextRunTimeUtc = GetNextRunTimeUtc();
} }
public void UpdateNextRunTime() protected void UpdateNextRunTime()
{ {
NextRunTimeUtc = GetNextRunTimeUtc(); NextRunTimeUtc = GetNextRunTimeUtc();
} }
@@ -37,11 +36,11 @@ namespace ICD.Common.Utils.Services.Scheduler
/// <summary> /// <summary>
/// Runs when the action has hit its scheduled time /// Runs when the action has hit its scheduled time
/// </summary> /// </summary>
public abstract void RunFinal(); protected abstract DateTime? RunFinal();
/// <summary> /// <summary>
/// Runs after RunFinal in order to set the next run time of this action /// Runs after RunFinal in order to set the next run time of this action
/// </summary> /// </summary>
public abstract DateTime? GetNextRunTimeUtc(); protected abstract DateTime? GetNextRunTimeUtc();
} }
} }