Skip to content

Commit

Permalink
Update the time trigger function
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrWachulec committed Jun 8, 2024
1 parent 9bc10b3 commit 82c1516
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/app/VMStartStop/TagManager/API/TagManagerTimeTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,12 @@ public string

_logger.LogInformation($"C# Timer trigger function executed at: {processingTime}");

_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}");
return null;
}

if (myTimer.ScheduleStatus is not null)
{
_logger.LogInformation($"Next timer schedule at: {myTimer.ScheduleStatus.Next}");
Expand Down

0 comments on commit 82c1516

Please sign in to comment.