feat(worker): broadcast PrimeFired SignalR event

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Mika Kuns
2026-04-28 09:03:15 +02:00
parent 09e3e7e8b5
commit 13c280f6d5

View File

@@ -1,9 +1,10 @@
using ClaudeDo.Data.Models; using ClaudeDo.Data.Models;
using ClaudeDo.Worker.Prime;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
namespace ClaudeDo.Worker.Hub; namespace ClaudeDo.Worker.Hub;
public sealed class HubBroadcaster public sealed class HubBroadcaster : IPrimeBroadcaster
{ {
private readonly IHubContext<WorkerHub> _hub; private readonly IHubContext<WorkerHub> _hub;
@@ -47,4 +48,10 @@ public sealed class HubBroadcaster
public Task PlanningCompleted(string planningTaskId) => public Task PlanningCompleted(string planningTaskId) =>
_hub.Clients.All.SendAsync("PlanningCompleted", planningTaskId); _hub.Clients.All.SendAsync("PlanningCompleted", planningTaskId);
public Task PrimeFired(Guid scheduleId, bool success, string message, DateTimeOffset firedAt) =>
_hub.Clients.All.SendAsync("PrimeFired", scheduleId, success, message, firedAt);
Task IPrimeBroadcaster.PrimeFiredAsync(Guid scheduleId, bool success, string message, DateTimeOffset firedAt) =>
PrimeFired(scheduleId, success, message, firedAt);
} }