테스트 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

This commit is contained in:
2026-08-02 17:37:12 +09:00
parent cc7d963755
commit 74ddd95a05
16 changed files with 258 additions and 66 deletions
@@ -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