You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/10/18 16:02:18 UTC

[airavata] 01/02: AIRAVATA-3235 Default creationTime to current time

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 415f4419294c29872508d93c38c05ab938bbe927
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Oct 18 12:01:33 2019 -0400

    AIRAVATA-3235 Default creationTime to current time
---
 .../registry/core/entities/appcatalog/ResourceJobManagerEntity.java    | 3 ++-
 .../registry/core/entities/appcatalog/SshJobSubmissionEntity.java      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
index 681d420..69f1f7b 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/ResourceJobManagerEntity.java
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.registry.core.entities.appcatalog;
 
+import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.appcatalog.computeresource.ResourceJobManagerType;
 
 import javax.persistence.*;
@@ -39,7 +40,7 @@ public class ResourceJobManagerEntity implements Serializable {
     private String resourceJobManagerId;
 
     @Column(name = "CREATION_TIME", nullable = false, updatable = false)
-    private Timestamp creationTime;
+    private Timestamp creationTime = AiravataUtils.getCurrentTimestamp();
 
     @Column(name = "JOB_MANAGER_BIN_PATH")
     private String jobManagerBinPath;
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
index c8f8ea8..db7beeb 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/entities/appcatalog/SshJobSubmissionEntity.java
@@ -20,6 +20,7 @@
 */
 package org.apache.airavata.registry.core.entities.appcatalog;
 
+import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.model.data.movement.SecurityProtocol;
 
 import javax.persistence.*;
@@ -48,7 +49,7 @@ public class SshJobSubmissionEntity implements Serializable {
 	private String alternativeSshHostname;
 
 	@Column(name="CREATION_TIME", nullable = false, updatable = false)
-	private Timestamp creationTime;
+	private Timestamp creationTime = AiravataUtils.getCurrentTimestamp();
 
 	@Column(name="MONITOR_MODE")
 	private String monitorMode;