Skip to content

Commit

Permalink
Merge pull request #45 from weni-ai/fix/order-trigger-resume
Browse files Browse the repository at this point in the history
Fix/order trigger resume
  • Loading branch information
Robi9 authored Oct 6, 2023
2 parents ecd597a + 7bb8a96 commit 946867b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions core/tasks/handler/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,14 @@ func handleMsgEvent(ctx context.Context, rt *runtime.Runtime, event *MsgEvent) e
// if metadata has order key set msg order
mdValue, ok := metadata["order"]
if ok {
var order *types.XObject
var order *flows.Order
asJSON, err := json.Marshal(mdValue)
if err != nil {
log.WithError(err).Error("unable to marshal metadata from msg event")
}
order, err = types.ReadXObject(asJSON)
err = json.Unmarshal(asJSON, &order)
if err != nil {
log.WithError(err).Error("unable to marshal metadata from msg event")
log.WithError(err).Error("unable to unmarshal orderJSON from metadata[\"order\"]")
}
msgIn.SetOrder(order)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ go 1.17

replace github.com/nyaruka/gocommon => github.com/Ilhasoft/gocommon v1.16.2-weni

replace github.com/nyaruka/goflow => github.com/weni-ai/goflow v0.2.1-goflow-0.144.3
replace github.com/nyaruka/goflow => github.com/weni-ai/goflow v0.2.2-goflow-0.144.3
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLD
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
github.com/weni-ai/goflow v0.2.1-goflow-0.144.3 h1:S0XbKNyLBouaZutSR0CoHbK3WAY5Qwx2BBd16ej5Ls8=
github.com/weni-ai/goflow v0.2.1-goflow-0.144.3/go.mod h1:o0xaVWP9qNcauBSlcNLa79Fm2oCPV+BDpheFRa/D40c=
github.com/weni-ai/goflow v0.2.2-goflow-0.144.3 h1:J2Cf+phVgu9BbUBfebISAZisktF+DxG9Q2IA+9Ujg0w=
github.com/weni-ai/goflow v0.2.2-goflow-0.144.3/go.mod h1:o0xaVWP9qNcauBSlcNLa79Fm2oCPV+BDpheFRa/D40c=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down

0 comments on commit 946867b

Please sign in to comment.