Skip to content

Commit

Permalink
StreamID => type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
samsondav committed Jan 11, 2024
1 parent aa24834 commit 6126870
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/services/streams/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (d *Delegate) ServicesForSpec(jb job.Job) (services []job.ServiceCtx, err e
return nil, errors.New("job name is required to be present for stream specs")
}
id := StreamID(jb.Name.String)
lggr := d.lggr.Named(id.String()).With("streamID", id)
lggr := d.lggr.Named(id).With("streamID", id)

rrs := ocrcommon.NewResultRunSaver(d.runner, lggr, d.cfg.MaxSuccessfulRuns(), d.cfg.ResultWriteQueueDepth())
services = append(services, rrs, &StreamService{
Expand Down
6 changes: 1 addition & 5 deletions core/services/streams/stream_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
)

type StreamID string

func (s StreamID) String() string {
return string(s)
}
type StreamID = string

type Registry interface {
Get(streamID StreamID) (strm Stream, exists bool)
Expand Down

0 comments on commit 6126870

Please sign in to comment.