Skip to content

Commit

Permalink
Remove redundant delay interval
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadUsama-afk-equinor authored and UsamaEquinorAFK committed Dec 12, 2023
1 parent 0a3ab94 commit fbf95a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions backend/api/EventHandlers/InspectionFindingEventHandler.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
using NCrontab;
using System.Globalization;
using System.Globalization;
using System.Net;
using System.Net.Http.Headers;
using System.Text;
using Api.Database.Models;
using Api.Services;
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;
using NCrontab;

namespace Api.EventHandlers
{
public class InspectionFindingEventHandler(IConfiguration configuration,
IServiceScopeFactory scopeFactory,
ILogger<InspectionFindingEventHandler> logger) : BackgroundService
{
private readonly string _cronExpression = "30 16 * * * ";
private readonly TimeSpan _interval = configuration.GetValue<TimeSpan>("InspectionFindingEventHandler:Interval");
private readonly string _cronExpression = "00 13 * * * ";
private InspectionFindingService InspectionFindingService => scopeFactory.CreateScope().ServiceProvider.GetRequiredService<InspectionFindingService>();
private readonly TimeSpan _timeSpan = configuration.GetValue<TimeSpan>("InspectionFindingEventHandler:TimeSpan");

Expand Down
1 change: 0 additions & 1 deletion backend/api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"BackendBaseRoute": "",
"TimeRangeForMissionDurationEstimationInDays": 30,
"InspectionFindingEventHandler": {
"Interval": "00:20:00",
"TimeSpan": "23:59:59"
}
}

0 comments on commit fbf95a5

Please sign in to comment.