Skip to content

Commit

Permalink
Add breaking time trigger if isPastDue is true
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrWachulec committed May 30, 2024
1 parent c0d8947 commit a3374c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/VMStartStop/TagManager/API/TagManagerTimeTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public string

_logger.LogInformation($"Log triggered at: {myTimer.ScheduleStatus.Last}");

if (myTimer.IsPastDue)
{
_logger.LogInformation("Timer is running late!");
return null;
}

if (DateTime.Compare(myTimer.ScheduleStatus.Last, DateTime.Now.AddMinutes(-15)) < 0)
{
_logger.LogInformation($"Trigger is too late: triggered at: {myTimer.ScheduleStatus.Last}; processing time: {processingTime}");
Expand Down

0 comments on commit a3374c5

Please sign in to comment.