This is an automated email from the ASF dual-hosted git repository.
yasith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new dd2d815106 use current timestsamp when saving process statuses
dd2d815106 is described below
commit dd2d81510623f7aeb5b6f93c2f5f2d1466be341f
Author: yasithdev <[email protected]>
AuthorDate: Mon Jul 14 09:03:16 2025 -0500
use current timestsamp when saving process statuses
---
.../registry/core/entities/expcatalog/ProcessStatusEntity.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
a/airavata-api/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
b/airavata-api/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
index 637ea193e0..44bfb8e29e 100644
---
a/airavata-api/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
+++
b/airavata-api/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
@@ -46,7 +46,7 @@ public class ProcessStatusEntity implements Serializable {
private ProcessState state;
@Column(name = "TIME_OF_STATE_CHANGE")
- private Timestamp timeOfStateChange;
+ private Timestamp timeOfStateChange = null;
@Lob
@Column(name = "REASON")
@@ -105,4 +105,11 @@ public class ProcessStatusEntity implements Serializable {
public void setProcess(ProcessEntity process) {
this.process = process;
}
+
+ @PrePersist
+ protected void onCreate() {
+ if (timeOfStateChange == null) {
+ this.timeOfStateChange = new Timestamp(System.currentTimeMillis());
+ }
+ }
}