Skip to content

Commit

Permalink
fix(command/cmdbus): fix debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
bounoable committed Aug 3, 2022
1 parent 89346f3 commit 403adc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command/cmdbus/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (b *Bus) commandDispatched(evt event.Of[CommandDispatchedData]) {
})

b.debugLog("requesting to become the handler for %q command ... [id=%s]", data.Name, data.ID)
b.debugLog("publishing %q event ...", evt.Name())
b.debugLog("publishing %q event ...", requestEvent.Name())

if err := b.bus.Publish(b.Context(), requestEvent.Any()); err != nil {
b.fail(fmt.Errorf("[goes/command/cmdbus.Bus@commandDispatched] Failed to request %q command: %w", data.Name, err))
Expand Down Expand Up @@ -462,7 +462,7 @@ func (b *Bus) commandRequested(evt event.Of[CommandRequestedData]) {
BusID: data.BusID,
})

b.debugLog("publishing %q event ...", evt.Name())
b.debugLog("publishing %q event ...", assignEvent.Name())

if err := b.bus.Publish(b.Context(), assignEvent.Any()); err != nil {
b.fail(fmt.Errorf("[goes/command/cmdbus.Bus@commandRequested] Failed to assign %q command to handler %q: %w", cmd.cmd.Name(), data.BusID, err))
Expand Down
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS
go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.mongodb.org/mongo-driver v1.9.0/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY=
go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
Expand Down

0 comments on commit 403adc8

Please sign in to comment.