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