Ensure requested at is only set when a task was manually requested (#13013)

pull/13018/head
Lyon Hill 2019-03-29 09:58:38 -06:00 committed by GitHub
parent 9a9432e50f
commit 1d405f90b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -150,9 +150,10 @@ func (tcs *taskControlAdaptor) UpdateRunState(ctx context.Context, taskID, runID
Task: st,
RunID: runID,
RunScheduledFor: schedFor.Unix(),
RequestedAt: reqAt.Unix(),
}
if !reqAt.IsZero() {
rlb.RequestedAt = reqAt.Unix()
}
if err := tcs.lw.UpdateRunState(ctx, rlb, when, state); err != nil {
return err
}
@ -200,7 +201,9 @@ func (tcs *taskControlAdaptor) AddRunLog(ctx context.Context, taskID, runID infl
Task: st,
RunID: runID,
RunScheduledFor: schedFor.Unix(),
RequestedAt: reqAt.Unix(),
}
if !reqAt.IsZero() {
rlb.RequestedAt = reqAt.Unix()
}
return tcs.lw.AddRunLog(ctx, rlb, when, log)
}