Class Job
Represents a batch job.
Inherited Members
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public class Job : FlowModelObject
Constructors
View SourceJob(String)
Initializes a new instance of the Job class.
Declaration
public Job(string userId = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | The user identifier. |
Remarks
Notice that the job can be created without setting a user id, but by default, the Job Scheduler will not allow a job to be scheduled without setting a valid user id.
Job(String, String)
Initializes a new instance of the Job class.
Declaration
public Job(string jobId, string userId)
Parameters
Type | Name | Description |
---|---|---|
System.String | jobId | The job identifier. |
System.String | userId | The user identifier, which should be an email address and conform to the validation rules set by the JobScheduler used. |
Properties
View SourceClientReference
Gets or sets the client job reference. This is reserved for use by the client for referencing purposes and will not be used by One Compute.
Declaration
public string ClientReference { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client job reference. |
DeploymentModel
Gets or sets the deployment model.
Declaration
public DeploymentModel DeploymentModel { get; set; }
Property Value
Type | Description |
---|---|
DeploymentModel | The deployment model. |
FailureStrategy
Gets the failure strategy for the job.
Declaration
public FailureStrategy FailureStrategy { get; }
Property Value
Type | Description |
---|---|
FailureStrategy | The failure strategy. |
JobId
Gets the job identifier.
Declaration
public string JobId { get; }
Property Value
Type | Description |
---|---|
System.String | The job identifier. |
JobPreparationWork
Gets or sets the Job Preparation Task for preparing the nodes to execute this Job.
Declaration
public WorkUnit JobPreparationWork { get; set; }
Property Value
Type | Description |
---|---|
WorkUnit | The Job Preparation Task for this Job. |
JobReleaseWork
Gets or sets the Job Release Task to execute on the nodes after this Job completes.
Declaration
public WorkUnit JobReleaseWork { get; set; }
Property Value
Type | Description |
---|---|
WorkUnit | The Job Release Task for this Job. |
Name
Gets or sets the name of the job. This is reserved for use by the client for description purposes and will not be used by One Compute.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the job. |
PoolId
Gets or sets the requested pool id.
Declaration
public string PoolId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The id of the requested pool. |
SchedulingOptions
Gets or sets the scheduling options for scheduling the work inside this Job.
Declaration
public SchedulingOptions SchedulingOptions { get; set; }
Property Value
Type | Description |
---|---|
SchedulingOptions | The scheduling options for this Job. |
ServiceName
Gets or sets the requested service name.
Declaration
public string ServiceName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the service. |
Remarks
In the context of OneCompute Platform, this is the name of the application.
Tags
Gets or sets tags of the job.
Declaration
public string Tags { get; set; }
Property Value
Type | Description |
---|---|
System.String | The tags. |
Remarks
Tags are semicolon separated string.
TimeoutSeconds
Gets or sets the job timeout in seconds.
Declaration
public int TimeoutSeconds { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The job timeout in seconds. |
Remarks
If set to a value > 0, the job will be canceled if the job has not completed within this amount of seconds. If set to 0 (default) or less, the job will never time out.
UserId
Gets or sets the identifier of the user submitting the job.
Declaration
public string UserId { get; set; }
Property Value
Type | Description |
---|---|
System.String | The user identifier. |
Work
Gets or sets the work.
Declaration
public WorkItem Work { get; set; }
Property Value
Type | Description |
---|---|
WorkItem | The work. |
Methods
View SourceGetWorkItem(String)
Gets the work item.
Declaration
public WorkItem GetWorkItem(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier. |
Returns
Type | Description |
---|---|
WorkItem | The work item. |
Initialize()
Initializes this instance.
Declaration
public void Initialize()
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |