Skip to content

Commit

Permalink
purge unused StreamEvent.Data field
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrebel committed May 4, 2023
1 parent f58e79c commit 342794f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions internal/model/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/google/uuid"
cptypes "github.com/metal-toolbox/conditionorc/pkg/types"
"go.hollow.sh/toolbox/events"
"go.infratographer.com/x/pubsubx"
"go.infratographer.com/x/urnx"
)

Expand Down Expand Up @@ -140,15 +139,11 @@ type Task struct {

// StreamEvent holds properties of a message received on the stream.
type StreamEvent struct {
// Msg is the original message that created this task.
// Msg is the original event that created this task.
// This is here so that the events subsystem can be acked/notified as the task makes progress.
Msg events.Message

// Data is the data parsed from Msg for the task runner.
Data *pubsubx.Message

// Condition defines the kind of work to be performed,
// its parsed from the message.
// Condition defines the kind of work to be performed, its parsed from Data.
Condition *cptypes.Condition

// Urn is the URN parsed from Msg for the task runner.
Expand Down
1 change: 0 additions & 1 deletion internal/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ func (o *Worker) processEvent(ctx context.Context, e events.Message) {

streamEvent := &model.StreamEvent{
Msg: e,
Data: data,
Condition: condition,
Urn: urn,
}
Expand Down

0 comments on commit 342794f

Please sign in to comment.