Skip to content

Commit 912b6c7

Browse files
committed
turn nodejsexecuter proto binary to json
1 parent 8b9cb8e commit 912b6c7

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

libraries/backend/internal/api/rflow/rflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ func (c *FlowServiceRPC) FlowRunAdHoc(ctx context.Context, req *connect.Request[
689689
var clientPtr *nodejs_executorv1connect.NodeJSExecutorServiceClient
690690
for i, jsNode := range jsNodes {
691691
if i == 0 {
692-
client := nodejs_executorv1connect.NewNodeJSExecutorServiceClient(httpclient.New(), "http://localhost:9090")
692+
client := nodejs_executorv1connect.NewNodeJSExecutorServiceClient(httpclient.New(), "http://localhost:9090", connect.WithProtoJSON())
693693
clientPtr = &client
694694
}
695695

libraries/backend/pkg/flow/node/njs/njs.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ func (n NodeJS) RunAsync(ctx context.Context, req *node.FlowNodeRequest, resultC
9494
resultChan <- result
9595
return
9696
}
97-
fmt.Println("helllo", val)
9897

9998
rpcReqRaw := nodejs_executorv1.ExecuteNodeJSRequest{
10099
Context: val,

libraries/backend/pkg/flow/runner/flowlocalrunner/flowlocalrunner.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ func (r FlowLocalRunner) Run(ctx context.Context, flowNodeStatusChan chan runner
8383

8484
if err != nil {
8585
flowStatusChan <- runner.FlowStatusFailed
86-
return err
86+
} else {
87+
flowStatusChan <- runner.FlowStatusSuccess
8788
}
88-
flowStatusChan <- runner.FlowStatusSuccess
89-
return nil
89+
return err
9090
}
9191

9292
type processResult struct {

0 commit comments

Comments
 (0)