mirror of
https://github.com/harness/drone.git
synced 2025-05-04 16:52:22 +08:00
add job type to the job state change struct (#759)
This commit is contained in:
parent
b221ed9080
commit
12c38f88a9
@ -126,6 +126,7 @@ func (e *Executor) exec(
|
||||
|
||||
jobDummy := &types.Job{
|
||||
UID: jobUID,
|
||||
Type: jobType,
|
||||
Updated: time.Now().UnixMilli(),
|
||||
Result: result,
|
||||
State: enum.JobStateRunning,
|
||||
|
@ -32,6 +32,7 @@ const (
|
||||
func encodeStateChange(job *types.Job) ([]byte, error) {
|
||||
stateChange := &types.JobStateChange{
|
||||
UID: job.UID,
|
||||
Type: job.Type,
|
||||
State: job.State,
|
||||
Progress: job.RunProgress,
|
||||
Result: job.Result,
|
||||
|
@ -42,6 +42,7 @@ type Job struct {
|
||||
|
||||
type JobStateChange struct {
|
||||
UID string `json:"uid"`
|
||||
Type string `json:"type"`
|
||||
State enum.JobState `json:"state"`
|
||||
Progress int `json:"progress"`
|
||||
Result string `json:"result"`
|
||||
|
Loading…
Reference in New Issue
Block a user