fix(worker): DeleteTask aus der UI schlug immer mit generischem Serverfehler fehl

Der CancellationToken-Parameter auf der nicht-streamenden Hub-Methode liess SignalR jede Invocation vor dem Methodenrumpf abbrechen. Die Tests riefen den Hub direkt auf und sahen das nicht; neuer Reflection-Guard verbietet CancellationToken auf allen nicht-streamenden Hub-Methoden.
This commit is contained in:
mika kuns
2026-09-28 13:02:47 +02:00
parent c8b2ad046a
commit 352aaa525b
2 changed files with 24 additions and 5 deletions
+4 -1
View File
@@ -277,8 +277,11 @@ public sealed class WorkerHub : Microsoft.AspNetCore.SignalR.Hub
// TryAdvanceParentAsync side effect — a direct-repo delete from the details pane
// used to skip it, permanently wedging a WaitingForChildren parent whose last
// child was deleted from there.
public async Task DeleteTask(string taskId, CancellationToken cancellationToken)
// No CancellationToken parameter: SignalR can't bind one on a non-streaming method and fails
// every invocation with a generic server error before the body runs.
public async Task DeleteTask(string taskId)
{
var cancellationToken = CancellationToken.None;
await using var ctx = await _dbFactory.CreateDbContextAsync(cancellationToken);
var repo = new TaskRepository(ctx);
var task = await repo.GetByIdAsync(taskId, cancellationToken)