Skip to content

Commit

Permalink
fix(kv/task): Copy the latest success/failure fields when unmarshalling.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettbuddin committed Aug 25, 2020
1 parent d3632f8 commit 989b5bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kv/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ type kvTask struct {
Offset influxdb.Duration `json:"offset,omitempty"`
LatestCompleted time.Time `json:"latestCompleted,omitempty"`
LatestScheduled time.Time `json:"latestScheduled,omitempty"`
LatestSuccess time.Time `json:"latestSuccess,omitempty"`
LatestFailure time.Time `json:"latestFailure,omitempty"`
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
Expand All @@ -74,6 +76,8 @@ func kvToInfluxTask(k *kvTask) *influxdb.Task {
Offset: k.Offset.Duration,
LatestCompleted: k.LatestCompleted,
LatestScheduled: k.LatestScheduled,
LatestSuccess: k.LatestSuccess,
LatestFailure: k.LatestFailure,
CreatedAt: k.CreatedAt,
UpdatedAt: k.UpdatedAt,
Metadata: k.Metadata,
Expand Down

0 comments on commit 989b5bd

Please sign in to comment.