Skip to content

Commit

Permalink
doc(echo): Add comment to EmitEvent
Browse files Browse the repository at this point in the history
Document the reason for emitting the "WORKING" event.
  • Loading branch information
subpop committed Dec 10, 2024
1 parent 55c21b6 commit 293b7ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions worker/echo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ func echo(
metadata map[string]string,
data []byte,
) error {
// Emit a "WORKING" event, notifying listeners that a significant
// event in the worker has occurred. This is optional and may be emitted
// whenever appropriate. The data parameter may contain any number of
// key/value pairs that will be emitted along with the event.
if err := w.EmitEvent(
ipc.WorkerEventNameWorking,
rcvId,
Expand Down

0 comments on commit 293b7ce

Please sign in to comment.