Skip to content

Commit

Permalink
[chore] Use MessageEmitter interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-cordenier committed Oct 25, 2024
1 parent 2d1c349 commit 6491622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/services/workflows/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type secretsFetcher interface {
// Engine handles the lifecycle of a single workflow and its executions.
type Engine struct {
services.StateMachine
cma custmsg.Labeler
cma custmsg.MessageEmitter
metrics workflowsMetricLabeler
logger logger.Logger
registry core.CapabilitiesRegistry
Expand Down Expand Up @@ -1240,8 +1240,8 @@ func (e *workflowError) Error() string {
return errStr
}

func logCustMsg(cma custmsg.Labeler, msg string, log logger.Logger) {
err := cma.SendLogAsCustomMessage(msg)
func logCustMsg(cma custmsg.MessageEmitter, msg string, log logger.Logger) {
err := cma.Emit(msg)
if err != nil {
log.Errorf("failed to send custom message with msg: %s", msg)
}
Expand Down

0 comments on commit 6491622

Please sign in to comment.