Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
fixup! work: Add start time to build result
Browse files Browse the repository at this point in the history
  • Loading branch information
apostergiou committed Apr 16, 2018
1 parent 10ae45d commit 0d60114
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion types/build_result.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package types

import (
"fmt"
"time"
)

type BuildResult struct {
Expand All @@ -25,7 +26,7 @@ type BuildResult struct {
TransportMethod TransportMethod

// The job's start time
StartTime string
StartTime time.Time
}

type ErrImageBuild struct {
Expand Down
2 changes: 1 addition & 1 deletion worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (s *Server) Work(ctx context.Context, j *Job) (buildResult *types.BuildResu
buildResult = &types.BuildResult{
Path: filepath.Join(j.ReadyBuildPath, DataDir, ArtifactsDir),
TransportMethod: types.Rsync,
StartTime: time.Now().Local().Format("01/02/2006 15:04:05"),
StartTime: time.Now().Local(),
}

_, err = os.Stat(j.ReadyBuildPath)
Expand Down

0 comments on commit 0d60114

Please sign in to comment.