테스트 DB 계약과 실행 안전성 정렬
ci / backend (push) Failing after 0s
ci / static (push) Failing after 6s
ci / backend (pull_request) Failing after 1s
ci / static (pull_request) Failing after 7s
Build & Test with Secrets / build (pull_request) Failing after 1s
ci / frontend (push) Failing after 48s
Build & Test with Secrets / security-scan (pull_request) Successful in 5s
Build & Test with Secrets / frontend (pull_request) Failing after 1m23s
ci / frontend (pull_request) Failing after 1m32s
Build & Test with Secrets / notification (pull_request) Failing after 2s
ci / backend (push) Failing after 0s
ci / static (push) Failing after 6s
ci / backend (pull_request) Failing after 1s
ci / static (pull_request) Failing after 7s
Build & Test with Secrets / build (pull_request) Failing after 1s
ci / frontend (push) Failing after 48s
Build & Test with Secrets / security-scan (pull_request) Successful in 5s
Build & Test with Secrets / frontend (pull_request) Failing after 1m23s
ci / frontend (pull_request) Failing after 1m32s
Build & Test with Secrets / notification (pull_request) Failing after 2s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using KArtSell.BuildingBlocks.Data;
|
||||
using KArtSell.BuildingBlocks.Time;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Net.Http;
|
||||
|
||||
@@ -15,17 +16,20 @@ public sealed class RecommendationReportGenerator
|
||||
private readonly IDbConnectionFactory _connectionFactory;
|
||||
private readonly HttpClient _httpClient;
|
||||
private readonly ILogger<RecommendationReportGenerator> _logger;
|
||||
private readonly IClock _clock;
|
||||
private readonly string _telegramBotToken;
|
||||
private readonly string _telegramChatId;
|
||||
|
||||
public RecommendationReportGenerator(
|
||||
IDbConnectionFactory connectionFactory,
|
||||
HttpClient httpClient,
|
||||
ILogger<RecommendationReportGenerator> logger)
|
||||
ILogger<RecommendationReportGenerator> logger,
|
||||
IClock clock)
|
||||
{
|
||||
_connectionFactory = connectionFactory;
|
||||
_httpClient = httpClient;
|
||||
_logger = logger;
|
||||
_clock = clock;
|
||||
_telegramBotToken = Environment.GetEnvironmentVariable("TELEGRAM_BOT") ?? string.Empty;
|
||||
_telegramChatId = Environment.GetEnvironmentVariable("CHAT_ID") ?? string.Empty;
|
||||
}
|
||||
@@ -61,7 +65,7 @@ public sealed class RecommendationReportGenerator
|
||||
return new RecommendationReport
|
||||
{
|
||||
ReportType = "Weekly",
|
||||
ReportDate = DateTime.UtcNow,
|
||||
ReportDate = _clock.UtcNow.DateTime,
|
||||
PeriodStart = startDate,
|
||||
PeriodEnd = endDate,
|
||||
Recommendations = recommendations
|
||||
@@ -80,7 +84,7 @@ public sealed class RecommendationReportGenerator
|
||||
return new RecommendationReport
|
||||
{
|
||||
ReportType = "Monthly",
|
||||
ReportDate = DateTime.UtcNow,
|
||||
ReportDate = _clock.UtcNow.DateTime,
|
||||
PeriodStart = startDate,
|
||||
PeriodEnd = endDate,
|
||||
Recommendations = recommendations
|
||||
|
||||
Reference in New Issue
Block a user