feat(worker): broadcast PrimeFired SignalR event
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user