Skip to content

Commit

Permalink
Remove tag manager service from time trigger fcn
Browse files Browse the repository at this point in the history
  • Loading branch information
PiotrWachulec committed Apr 24, 2024
1 parent 3fe1960 commit 7314698
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/VMStartStop/TagManager/API/TagManagerTimeTrigger.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.Azure.Functions.Worker;
using Microsoft.Extensions.Logging;
using MyCo.TagManager.Application;
using MyCo.TagManager.Application.Commands;
using System.Text.Json;

Expand All @@ -9,12 +8,10 @@ namespace MyCo.TagManager.API;
public class TagManagerTimeTrigger
{
private readonly ILogger _logger;
private readonly ITagManagerService _tagManagerService;

public TagManagerTimeTrigger(ILoggerFactory loggerFactory, ITagManagerService tagManagerService)
public TagManagerTimeTrigger(ILoggerFactory loggerFactory)
{
_logger = loggerFactory.CreateLogger<TagManagerTimeTrigger>();
_tagManagerService = tagManagerService;
}

[Function("TagManager")]
Expand All @@ -25,9 +22,6 @@ public string Run([TimerTrigger("0 */15 * * * *")] TimerInfo myTimer)

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

Check warning on line 23 in src/app/VMStartStop/TagManager/API/TagManagerTimeTrigger.cs

View workflow job for this annotation

GitHub Actions / build-and-deploy

Dereference of a possibly null reference.

Check warning on line 23 in src/app/VMStartStop/TagManager/API/TagManagerTimeTrigger.cs

View workflow job for this annotation

GitHub Actions / build-and-deploy

Dereference of a possibly null reference.

_logger.LogInformation("Processing tags");
_logger.LogInformation("Tags processed");

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

0 comments on commit 7314698

Please sign in to comment.