Skip to content

Commit 545b674

Browse files
authored
Channel context followup
1 parent 6eea922 commit 545b674

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/workflowstate/signalchannels.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
"github.com/cschleiden/go-workflows/internal/sync"
77
)
88

9-
func ReceiveSignal(ctx sync.Context, wf *WfState, name string, arg payload.Payload) {
9+
func ReceiveSignal(wf *WfState, name string, arg payload.Payload) {
1010
sc, ok := wf.signalChannels[name]
1111
if ok {
12-
sc.receive(ctx, arg)
12+
sc.receive(arg)
1313
return
1414
}
1515

@@ -34,15 +34,15 @@ func GetSignalChannel[T any](ctx sync.Context, wf *WfState, name string) sync.Ch
3434

3535
// Add channel to map
3636
wf.signalChannels[name] = &signalChannel{
37-
receive: func(ctx sync.Context, input payload.Payload) {
37+
receive: func(input payload.Payload) {
3838
var t T
3939
if err := converter.DefaultConverter.From(input, &t); err != nil {
4040
panic(err)
4141
}
4242

4343
// Channel is buffered, so we can just send without waiting and potentially
4444
// blocking on a Yield.
45-
c.SendNonblocking(ctx, t)
45+
c.SendNonblocking(t)
4646
},
4747
channel: c,
4848
}

internal/workflowstate/workflowstate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func AsDecodingSettable[T any](f sync.SettableFuture[T]) DecodingSettable {
4242
}
4343

4444
type signalChannel struct {
45-
receive func(sync.Context, payload.Payload)
45+
receive func(payload.Payload)
4646
channel interface{}
4747
}
4848

0 commit comments

Comments
 (0)