Class Job
Represents a batch job.
Inherited Members
Namespace: DNVGL.One.Compute.Core.FlowModel
Assembly: DNVGL.One.Compute.Core.dll
Syntax
[DataContract]
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 |
---|---|---|
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
[JsonConstructor]
public Job(string jobId, string userId)
Parameters
Type | Name | Description |
---|---|---|
string | jobId | The job identifier. |
string | userId | The user identifier, which should be an email address and conform to the validation rules set by the JobScheduler used. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | jobId - The job Id cannot be empty. |
ArgumentException | jobId - The job Id must be between 1 and 64 characters long and can only contain alphanumeric, underscore and hyphen characters. |
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
[DataMember]
public string ClientReference { get; set; }
Property Value
Type | Description |
---|---|
string | The client job reference. |
DeploymentModel
Gets or sets the deployment model.
Declaration
[DataMember]
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. |
JobControllerWork
Gets or sets the job controller work. The job terminates when the job controller work unit terminates.
Declaration
[DataMember]
public WorkUnit JobControllerWork { get; set; }
Property Value
Type | Description |
---|---|
WorkUnit |
JobId
Gets the job identifier.
Declaration
[DataMember]
public string JobId { get; }
Property Value
Type | Description |
---|---|
string | The job identifier. |
JobPreparationWork
Gets or sets the Job Preparation Task for preparing the nodes to execute this Job.
Declaration
[DataMember]
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
[DataMember]
public WorkUnit JobReleaseWork { get; set; }
Property Value
Type | Description |
---|---|
WorkUnit | The Job Release Task for this Job. |
MaxLogLevel
Gets or sets the maximum log level for this job.
Declaration
[DataMember]
public TraceLevel MaxLogLevel { get; set; }
Property Value
Type | Description |
---|---|
TraceLevel |
Remarks
Messages logged by the worker with log levels above this value will be discarded. Default is Info.
MessageQueues
Gets or sets the message queues that can be used freely to communicate amongst the workers in the job while the Job is running.
Declaration
[DataMember]
public string[] MessageQueues { get; set; }
Property Value
Type | Description |
---|---|
string[] | The communication message queues 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
[DataMember]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the job. |
PoolId
Gets or sets the requested pool id.
Declaration
[DataMember]
public string PoolId { get; set; }
Property Value
Type | Description |
---|---|
string | The id of the requested pool. |
SchedulingOptions
Gets or sets the scheduling options for scheduling the work inside this Job.
Declaration
[DataMember]
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
[DataMember]
public string ServiceName { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember]
public string Tags { get; set; }
Property Value
Type | Description |
---|---|
string | The tags. |
Remarks
Tags are semicolon separated string.
TimeoutSeconds
Gets or sets the job timeout in seconds.
Declaration
[DataMember]
public int TimeoutSeconds { get; set; }
Property Value
Type | Description |
---|---|
int | 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
[DataMember]
public string UserId { get; set; }
Property Value
Type | Description |
---|---|
string | The user identifier. |
Work
Gets or sets the work.
Declaration
[DataMember]
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 |
---|---|---|
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 |
---|---|
string |