Skip to content

Commit

Permalink
show all status of containers
Browse files Browse the repository at this point in the history
task.StoppedAt is nil when task is not stopped.
  • Loading branch information
fujiwara committed Mar 1, 2022
1 parent 82cd3a3 commit 5f522b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ func (t *Tracer) traceTask(cluster string, taskID string) (*ecs.Task, error) {
msg += fmt.Sprintf(" (reason: %s)", *c.Reason)
}
var ts *time.Time
if aws.StringValue(c.LastStatus) == "RUNNING" {
ts = &t.now
} else {
switch aws.StringValue(c.LastStatus) {
case "STOPPED":
ts = task.StoppedAt
default:
ts = &t.now
}
t.AddEvent(ts, "CONTAINER:"+containerName, msg)
}
Expand Down

0 comments on commit 5f522b6

Please sign in to comment.