From 5ec2f8119e44c3afb640f30fd88d33293ce3bb72 Mon Sep 17 00:00:00 2001 From: smoh Date: Fri, 12 Dec 2025 10:20:12 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"DB=20=EC=84=9C=EB=B9=84=EC=8A=A4=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4cb779731445c90e6a663fb72cca10c624af58d1. --- Workers/TriliumWorker.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Workers/TriliumWorker.cs b/Workers/TriliumWorker.cs index e61c6a1..b681778 100644 --- a/Workers/TriliumWorker.cs +++ b/Workers/TriliumWorker.cs @@ -11,16 +11,13 @@ public class TriliumWorker : BackgroundService { private readonly Serilog.ILogger _log; private readonly AppConfigs _config; - private readonly IServiceScopeFactory _scopeFactory; // Singleton services cannot directly inject Scoped services. private readonly TriliumService _triliumService; private readonly Channel _issueChannel; - public TriliumWorker(AppConfigs configs, IServiceScopeFactory serviceScopeFactory, - TriliumService triliumService, Channel issueChannel) + public TriliumWorker(AppConfigs configs, TriliumService triliumService, Channel issueChannel) { _log = Log.ForContext(); _config = configs; - _scopeFactory = serviceScopeFactory; _triliumService = triliumService; _issueChannel = issueChannel; } @@ -30,15 +27,6 @@ public class TriliumWorker : BackgroundService while (!stoppingToken.IsCancellationRequested) { _log.Debug("Worker running at: {time}", DateTimeOffset.Now); - - using var scope = _scopeFactory.CreateScope(); - var db = scope.ServiceProvider.GetRequiredService(); - var unpublishedIssues = await db.GetUnpublishedJiraIssuesAsync(stoppingToken); - if (unpublishedIssues != null) - { - // Publish or update Trilium notes - } - await Task.Delay(10 *1000, stoppingToken); } }