feat(refine): wire RefineTask hub method, broadcaster events, and DI
This commit is contained in:
@@ -8,6 +8,7 @@ using ClaudeDo.Worker.Lifecycle;
|
||||
using ClaudeDo.Worker.Planning;
|
||||
using ClaudeDo.Worker.Prime;
|
||||
using ClaudeDo.Worker.Queue;
|
||||
using ClaudeDo.Worker.Refine;
|
||||
using ClaudeDo.Worker.Report;
|
||||
using ClaudeDo.Worker.Report.Interfaces;
|
||||
using ClaudeDo.Worker.State;
|
||||
@@ -83,6 +84,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
private readonly IPrimeRunner _primeRunner;
|
||||
private readonly ITaskStateService _state;
|
||||
private readonly IWeekReportService _report;
|
||||
private readonly IRefineRunner _refineRunner;
|
||||
|
||||
public WorkerHub(
|
||||
QueueService queue,
|
||||
@@ -102,7 +104,8 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
IPrimeScheduleSignal primeSignal,
|
||||
IPrimeRunner primeRunner,
|
||||
ITaskStateService state,
|
||||
IWeekReportService report)
|
||||
IWeekReportService report,
|
||||
IRefineRunner refineRunner)
|
||||
{
|
||||
_queue = queue;
|
||||
_waker = waker;
|
||||
@@ -122,6 +125,7 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
_primeRunner = primeRunner;
|
||||
_state = state;
|
||||
_report = report;
|
||||
_refineRunner = refineRunner;
|
||||
}
|
||||
|
||||
// Maps the two exceptions service methods throw into client-facing HubExceptions:
|
||||
@@ -541,6 +545,12 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
|
||||
_primeSignal.Signal();
|
||||
}
|
||||
|
||||
public Task RefineTask(string taskId)
|
||||
{
|
||||
_ = _refineRunner.RefineAsync(taskId, CancellationToken.None);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task<bool> RunDailyPrepNow()
|
||||
{
|
||||
var schedule = new PrimeScheduleDto(Guid.Empty, 0, TimeSpan.Zero, true, null, null);
|
||||
|
||||
Reference in New Issue
Block a user