Class JobSchedulerExtensions
Extension methods for IJobScheduler.
Inherited Members
Namespace: DNVGL.One.Compute.Core.Scheduling
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public static class JobSchedulerExtensions
Methods
View SourceCancelJobAndWaitForTerminationAsync(IJobScheduler, string)
Cancel the specified job and wait for termination.
Declaration
public static Task<WorkStatus> CancelJobAndWaitForTerminationAsync(this IJobScheduler jobScheduler, string jobId)
Parameters
| Type | Name | Description |
|---|---|---|
| IJobScheduler | jobScheduler | The job scheduler. |
| string | jobId | The job identifier. |
Returns
| Type | Description |
|---|---|
| Task<WorkStatus> | Asynchronous Task. |
CancelJobAndWaitForTerminationAsync(IJobScheduler, string, CancellationToken)
Cancel the specified job and wait for termination.
Declaration
public static Task<WorkStatus> CancelJobAndWaitForTerminationAsync(this IJobScheduler jobScheduler, string jobId, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IJobScheduler | jobScheduler | The job scheduler. |
| string | jobId | The job identifier. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<WorkStatus> | Asynchronous Task. |
SubmitJobAndWaitForTerminationAsync(IJobScheduler, Job)
Submit the job and wait for termination.
Declaration
public static Task<WorkStatus> SubmitJobAndWaitForTerminationAsync(this IJobScheduler jobScheduler, Job job)
Parameters
| Type | Name | Description |
|---|---|---|
| IJobScheduler | jobScheduler | The job scheduler. |
| Job | job | The job. |
Returns
| Type | Description |
|---|---|
| Task<WorkStatus> | Asynchronous Task. |
SubmitJobAndWaitForTerminationAsync(IJobScheduler, Job, CancellationToken)
Submit the job and wait for termination.
Declaration
public static Task<WorkStatus> SubmitJobAndWaitForTerminationAsync(this IJobScheduler jobScheduler, Job job, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| IJobScheduler | jobScheduler | The job scheduler. |
| Job | job | The job. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<WorkStatus> | Asynchronous Task. |