File tree Expand file tree Collapse file tree
airavata-api/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import java .util .HashMap ;
2626import java .util .List ;
2727import java .util .Map ;
28+
29+ import org .apache .airavata .common .utils .AiravataUtils ;
2830import org .apache .airavata .model .commons .airavata_commonsConstants ;
2931import org .apache .airavata .model .process .ProcessModel ;
3032import org .apache .airavata .model .scheduling .ComputationalResourceSchedulingModel ;
@@ -120,6 +122,7 @@ protected void populateParentIds(ProcessEntity processEntity) {
120122 logger .debug ("Populating the Primary Key of Task objects for the Process" );
121123 processEntity .getTasks ().forEach (taskEntity -> {
122124 taskEntity .setParentProcessId (processId );
125+ taskEntity .setCreationTime (AiravataUtils .getCurrentTimestamp ());
123126 taskRepository .populateParentIds (taskEntity );
124127 });
125128 }
Original file line number Diff line number Diff line change 2020package org .apache .airavata .registry .core .repositories .expcatalog ;
2121
2222import com .github .dozermapper .core .Mapper ;
23+
2324import java .util .ArrayList ;
2425import java .util .HashMap ;
2526import java .util .List ;
2627import java .util .Map ;
28+
29+ import org .apache .airavata .common .utils .AiravataUtils ;
2730import org .apache .airavata .model .commons .airavata_commonsConstants ;
2831import org .apache .airavata .model .task .TaskModel ;
2932import org .apache .airavata .registry .core .entities .expcatalog .TaskEntity ;
@@ -87,12 +90,18 @@ protected void populateParentIds(TaskEntity taskEntity) {
8790
8891 if (taskEntity .getTaskStatuses () != null ) {
8992 logger .debug ("Populating the Primary Key of TaskStatus objects for the Task" );
90- taskEntity .getTaskStatuses ().forEach (taskStatusEntity -> taskStatusEntity .setTaskId (taskId ));
93+ taskEntity .getTaskStatuses ().forEach (taskStatusEntity -> {
94+ taskStatusEntity .setTaskId (taskId );
95+ taskStatusEntity .setTimeOfStateChange (AiravataUtils .getCurrentTimestamp ());
96+ });
9197 }
9298
9399 if (taskEntity .getTaskErrors () != null ) {
94100 logger .debug ("Populating the Primary Key of TaskError objects for the Task" );
95- taskEntity .getTaskErrors ().forEach (taskErrorEntity -> taskErrorEntity .setTaskId (taskId ));
101+ taskEntity .getTaskErrors ().forEach (taskErrorEntity -> {
102+ taskErrorEntity .setTaskId (taskId );
103+ taskErrorEntity .setCreationTime (AiravataUtils .getCurrentTimestamp ());
104+ });
96105 }
97106
98107 if (taskEntity .getJobs () != null ) {
You can’t perform that action at this time.
0 commit comments