Table of Contents

Method RunTaskDeletionAsync

Namespace
Oscova.Agents.Tasks
Assembly
Oscova.Agents.dll

RunTaskDeletionAsync(string, string, Func<CancellationToken, Task<bool>>, CancellationToken, Func<CancellationToken, Task>?)

Cancels a task and keeps its admission closed while its definition is deleted.

public Task RunTaskDeletionAsync(string userId, string taskId, Func<CancellationToken, Task<bool>> deleteAsync, CancellationToken ct = default, Func<CancellationToken, Task>? afterDeleteAsync = null)

Parameters

userId string

The task owner's user identifier.

taskId string

The task identifier being deleted.

deleteAsync Func<CancellationToken, Task<bool>>

Deletes the persisted task definition after execution drains and reports whether it existed.

ct CancellationToken

A token that bounds cancellation, draining, and deletion.

afterDeleteAsync Func<CancellationToken, Task>?

Completes deletion side effects before task saves may resume.

Returns

Task