Interface IJobRepository
Interface for queuing jobs to be submitted to Clara Platform. The actual implementation stores all queued jobs in a database and deletes the job once the associated job is successfully submitted.
Namespace: Nvidia.Clara.DicomAdapter.API
Assembly: Nvidia.Clara.Dicom.API.dll
Syntax
public interface IJobRepository
Methods
| Improve this Doc View SourceAdd(InferenceJob)
Queues a new job for submission.
New
makes a copy of the instances to a temporary location that is to be
uploaded by the Nvidia.Clara.DicomAdapter.Server.Services.Jobs.JobSubmissionService
.
Declaration
Task Add(InferenceJob job)
Parameters
Type | Name | Description |
---|---|---|
InferenceJob | job |
Returns
Type | Description |
---|---|
Task |
Add(InferenceJob, Boolean)
Queues a new job for submission and disable EF change tracking.
New
makes a copy of the instances to a temporary location that is to be
uploaded by the Nvidia.Clara.DicomAdapter.Server.Services.Jobs.JobSubmissionService
.
Declaration
Task Add(InferenceJob job, bool enableTracking)
Parameters
Type | Name | Description |
---|---|---|
InferenceJob | job | |
Boolean | enableTracking |
Returns
Type | Description |
---|---|
Task |
ResetJobState()
Revert all jobs that are in processing states back into waiting states.
Declaration
Task ResetJobState()
Returns
Type | Description |
---|---|
Task |
Take(CancellationToken)
Take
returns the next pending request for submission.
The default implementation blocks the call until a pending request is available for submission.
Declaration
Task<InferenceJob> Take(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | cancellation token used to cancel the action. |
Returns
Type | Description |
---|---|
Task<InferenceJob> |
TransitionState(InferenceJob, InferenceJobStatus, CancellationToken)
Transition a job to the next processing state.
Declaration
Task<InferenceJob> TransitionState(InferenceJob job, InferenceJobStatus status, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
InferenceJob | job | |
InferenceJobStatus | status | Status of the request. |
CancellationToken | cancellationToken | cancellation token used to cancel the action. |
Returns
Type | Description |
---|---|
Task<InferenceJob> |