Skip to content

Commit

Permalink
Merge pull request #5 from fujiwara/last-status
Browse files Browse the repository at this point in the history
show all status of containers
  • Loading branch information
fujiwara authored Mar 1, 2022
2 parents 82cd3a3 + 5f522b6 commit d803c1f
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 d803c1f

Please sign in to comment.