Processing Job Manager
This topic describes the IProcessingJobManager interface, which is used to access the Processing Job Manager service. The Processing Job Manager service includes methods for executing inventory, discovery, and publishing jobs. It also includes a method for canceling any of these jobs for a processing set.
Inventory jobs
The following code illustrates how to run an inventory job by calling the SubmitInventoryJobsAsync() method on the proxy created with the IProcessingJobManager interface.
- Method
- SubmitInventoryJobsAsync: Submits data sources for an inventory job
- Parameters
- <int>workspaceID: ID of workspace that the processing set belongs to.
- <int>processingSetID: ID of processing set
View Sample C#
Copy
1
2
3
4
using (IProcessingJobManager proxy = _servicesMgr.CreateProxy<IProcessingJobManager>(ExecutionIdentity.CurrentUser))
{
await proxy. SubmitInventoryJobsAsync(data.WorkspaceId, processingSetID).ConfigureAwait(false);
}
Discovery jobs
The following code illustrates how to run a discovery job by calling the SubmitDiscoveryJobsAsync() method on the proxy created with the IProcessingJobManager interface.
- Method
- SubmitDiscoveryJobsAsync: Submits data sources for a discovery job
- Parameters
- <int>workspaceID: ID of workspace that the processing set belongs to.
- <int>processingSetID: ID of processing set
View Sample C#
Copy
1
2
3
4
using (IProcessingJobManager proxy = _servicesMgr.CreateProxy<IProcessingJobManager>(ExecutionIdentity.CurrentUser))
{
await proxy. SubmitDiscoveryJobsAsync(data.WorkspaceId, processingSetID).ConfigureAwait(false);
}
Publishing jobs
The following code illustrates how to execute a publishing job by calling the SubmitPublishJobsAsync() method on the proxy created with the IProcessingJobManager interface.
- Method
- SubmitPublishJobsAsync: Submits data sources for a publish job
- Parameters
- <int>workspaceID: ID of workspace that the processing set belongs to.
- <int>processingSetID: ID of processing set
View Sample C#
Copy
1
2
3
4
using (IProcessingJobManager proxy = _servicesMgr.CreateProxy<IProcessingJobManager>(ExecutionIdentity.CurrentUser))
{
await proxy. SubmitPublishJobsAsync(data.WorkspaceId, processingSetID).ConfigureAwait(false);
}
Retry Publishing jobs
The following code illustrates how to retry a job with errors by calling the SubmitRetryErrorsJobsAsync() method on the proxy created with the IProcessingJobManager interface.
- Method
- SubmitRetryErrorsJobsAsync: Submits data sources for a retry errors job
- Parameters
- <int>workspaceID: ID of workspace that the processing set belongs to.
- <int>processingSetID: ID of processing set
View Sample C#
Copy
1
2
3
4
using (IProcessingJobManager proxy = _servicesMgr.CreateProxy<IProcessingJobManager>(ExecutionIdentity.CurrentUser))
{
await proxy. SubmitRetryErrorsJobsAsync (data.WorkspaceId, processingSetID).ConfigureAwait(false);
}
Cancel jobs
You can use the SubmitCancelJobAsync() method to cancel inventory, discovery, and publishing jobs for a specific processing set. The following code illustrates how to execute a cancel job by calling this method on the proxy created with the IProcessingJobManager interface.
- Method
- SubmitCancelJobAsync: Submits a request for canceling a discovery, inventory, or publishing job
- Parameters
- <int>workspaceID: ID of workspace that the processing set belongs to.
- <int>processingSetID: ID of processing set
View Sample C#
Copy
1
2
3
4
using (IProcessingJobManager proxy = _servicesMgr.CreateProxy<IProcessingJobManager>(ExecutionIdentity.CurrentUser))
{
await proxy.SubmitCancelJobAsync(data.WorkspaceId, processingSetID).ConfigureAwait(false);
}