26.63. Class TaskWatcher
Namespace: ArmoniK.Core.Adapters.MongoDB
Assembly: ArmoniK.Core.Adapters.MongoDB.dll
Implementation of
public class TaskWatcher : ITaskWatcher, IInitializable, IHealthCheckProvider
26.63.1. Inheritance
26.63.2. Implements
ITaskWatcher, IInitializable, IHealthCheckProvider
26.63.3. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
26.63.4. Constructors
26.63.4.1. TaskWatcher(SessionProvider, MongoCollectionProvider<TaskData, TaskDataModelMapping>, ActivitySource, ILogger<TaskWatcher>)
Initializes
public TaskWatcher(SessionProvider sessionProvider, MongoCollectionProvider<TaskData, TaskDataModelMapping> taskCollectionProvider, ActivitySource activitySource, ILogger<TaskWatcher> logger)
26.63.4.1.1. Parameters
sessionProvider SessionProvider
MongoDB session provider
taskCollectionProvider MongoCollectionProvider<TaskData, TaskDataModelMapping>
Task collection provider
activitySource ActivitySource
Activity source
logger ILogger<TaskWatcher>
Logger used to produce logs
26.63.5. Methods
26.63.5.1. Check(HealthCheckTag)
Checks the status of a class for the given health check type.
public Task<HealthCheckResult> Check(HealthCheckTag tag)
26.63.5.1.1. Parameters
tag HealthCheckTag
Health check for which the class has to answer.
26.63.5.1.2. Returns
The result of the check containing the status of the class for the health check type.
26.63.5.2. GetNewTasks(Expression<Func<TaskData, bool>>, CancellationToken)
Receive a
public Task<IAsyncEnumerable<NewTask>> GetNewTasks(Expression<Func<TaskData, bool>> filter, CancellationToken cancellationToken = default)
26.63.5.2.1. Parameters
filter Expression<Func<TaskData, bool>>
Filter expression describing the tasks events to be returned
cancellationToken CancellationToken
Token used to cancel the execution of the method
26.63.5.2.2. Returns
Task<IAsyncEnumerable<NewTask>>
A
26.63.5.3. GetTaskStatusUpdates(Expression<Func<TaskData, bool>>, CancellationToken)
Receive a
public Task<IAsyncEnumerable<TaskStatusUpdate>> GetTaskStatusUpdates(Expression<Func<TaskData, bool>> filter, CancellationToken cancellationToken = default)
26.63.5.3.1. Parameters
filter Expression<Func<TaskData, bool>>
Filter expression describing the tasks events to be returned
cancellationToken CancellationToken
Token used to cancel the execution of the method
26.63.5.3.2. Returns
Task<IAsyncEnumerable<TaskStatusUpdate>>
A
26.63.5.4. Init(CancellationToken)
Executes an initialization process for the class
public Task Init(CancellationToken cancellationToken)
26.63.5.4.1. Parameters
cancellationToken CancellationToken
Token used to cancel the execution of the method
26.63.5.4.2. Returns
Task representing the asynchronous execution of the method