Class JobStatusEntity
The job status entity.
Inherited Members
Namespace: DNVGL.One.Compute.StorageLibrary.Entities
Assembly: DNVGL.One.Compute.StorageLibrary.dll
Syntax
public class JobStatusEntity : ICloneable, IJobStatusEntity
Constructors
View SourceJobStatusEntity()
Initializes a new instance of the JobStatusEntity class.
Declaration
public JobStatusEntity()
JobStatusEntity(Job)
Initializes a new instance of the JobStatusEntity class.
Declaration
public JobStatusEntity(Job job)
Parameters
Type | Name | Description |
---|---|---|
Job | job | The job. |
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 OneCompute.
Declaration
public string ClientReference { get; set; }
Property Value
Type | Description |
---|---|
string | The client job reference. |
CompletionTime
Gets or sets the completion time.
Declaration
public DateTime CompletionTime { get; set; }
Property Value
Type | Description |
---|---|
DateTime | The completion time (in UTC). |
Remarks
Backing field introduced to ensure time is returned in UTC. This was necessary because SQLite's string handling of DateTime seems to convert UTC into local time. NOTICE: This property is set every time the job status is updated, so its use has been extended beyond its original intention. Now it really reflects the time of last update, which is equivalent to CompletionTime once the State is terminal.
EnvironmentId
Gets or sets the id of the environment the job executed in.
Declaration
public string EnvironmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The id of the environment the job executed in. |
JobId
Gets or sets the job identifier.
Declaration
public string JobId { get; set; }
Property Value
Type | Description |
---|---|
string |
JobName
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 OneCompute.
Declaration
public string JobName { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the job. |
Message
Gets or sets the message for the job.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
string | The message. |
PoolId
Gets or sets the pool identifier.
Declaration
public string PoolId { get; set; }
Property Value
Type | Description |
---|---|
string |
Progress
Gets or sets progress.
Declaration
public double Progress { get; set; }
Property Value
Type | Description |
---|---|
double |
Remarks
Progress is defined as a fraction of 1, where 0 = no progress and 1 = complete.
ServiceName
Gets or sets the name of the service.
Declaration
public string ServiceName { get; set; }
Property Value
Type | Description |
---|---|
string | The name of the service. |
StartTime
Gets or sets the start time.
Declaration
public DateTime StartTime { get; set; }
Property Value
Type | Description |
---|---|
DateTime | The start time (in UTC). |
Remarks
Backing field introduced to ensure time is returned in UTC. This was necessary because SQLite's string handling of DateTime seems to convert UTC into local time.
State
Gets or sets State.
Declaration
public int State { get; set; }
Property Value
Type | Description |
---|---|
int |
TotalComputeSeconds
Gets or sets the accumulated compute time in seconds.
Declaration
public long TotalComputeSeconds { get; set; }
Property Value
Type | Description |
---|---|
long | The accumulated compute time in seconds. |
UserId
Gets or sets the user identifier.
Declaration
public string UserId { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceClone()
Returns memberwise clone.
Declaration
public virtual object Clone()
Returns
Type | Description |
---|---|
object | Cloned object/>. |
UpdateState(WorkStatus)
Update the job state.
Declaration
public void UpdateState(WorkStatus state)
Parameters
Type | Name | Description |
---|---|---|
WorkStatus | state | The state. |