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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user