Skip to content

Commit

Permalink
add startTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Penghui Yan committed Jun 19, 2018
1 parent 93e3075 commit 1830b0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller.v2/controller_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ func updateStatusSingle(tfjob *tfv1alpha2.TFJob, rtype tfv1alpha2.TFReplicaType,

//Update distributed training status
func updateStatusDistributed(tfjob *tfv1alpha2.TFJob, replicasStatus map[string]v1.PodPhase) error {
if tfjob.Status.StartTime == nil {
now := metav1.Now()
tfjob.Status.StartTime = &now
}

chiefReplicas, psReplicas, _ := getReplicasForTFJobType(tfjob)

Expand Down

0 comments on commit 1830b0e

Please sign in to comment.