Refactor boiler control and price logic: Introduce PriceConsts, improve BoilerAction handling with switch, and update namespaces for better structure.
This commit is contained in:
@@ -5,7 +5,7 @@ using Microsoft.Extensions.Logging;
|
||||
using NordPool.Models;
|
||||
using NordPool.Models.Dtos;
|
||||
using NordPoolManager.Interface;
|
||||
using NordPoolManager.Models;
|
||||
using NordPoolManager.Models.Consts;
|
||||
|
||||
namespace NordPoolManager;
|
||||
|
||||
@@ -49,8 +49,7 @@ public class NordPoolPriceService(Services services, IMapper mapper, ILogger<Nor
|
||||
LastUpdatedDate = DateTime.UtcNow;
|
||||
LastFetchedDate = today;
|
||||
|
||||
logger.LogInformation(
|
||||
"Prices ready for today ({Today}). Today prices count: {TodayCount}, Tomorrow prices count: {TomorrowCount}",
|
||||
logger.LogInformation("Prices ready for today ({Today}). Today prices count: {TodayCount}, Tomorrow prices count: {TomorrowCount}",
|
||||
today, TodayNordPoolPrice?.Prices?.Count ?? 0, TomorrowNordPoolPrice?.Prices?.Count ?? 0);
|
||||
}
|
||||
|
||||
@@ -149,7 +148,7 @@ public class NordPoolPriceService(Services services, IMapper mapper, ILogger<Nor
|
||||
LastFetchedDate = today;
|
||||
}
|
||||
|
||||
internal async Task<NordPoolPrice> GetNordPoolPriceAsync(DateOnly date)
|
||||
private async Task<NordPoolPrice> GetNordPoolPriceAsync(DateOnly date)
|
||||
{
|
||||
var nordPoolPricesDto = await _nordPoolServices.GetPricesForDateAsync(
|
||||
new NordpoolGetPricesForDateParameters
|
||||
|
||||
Reference in New Issue
Block a user