Skip to content

Commit 2b4a92f

Browse files

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

polycode/task.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func Start(params ...any) {
103103
func invokeApiHandler(c *gin.Context) {
104104
println("client: api request received")
105105
input := c.Request
106-
output := runTask(nil, input)
106+
output := runTask(c, input)
107107
c.JSON(http.StatusOK, output)
108108
}
109109

@@ -115,7 +115,7 @@ func invokeServiceHandler(c *gin.Context) {
115115
return
116116
}
117117

118-
output := runTask(nil, input)
118+
output := runTask(c, input)
119119
c.JSON(http.StatusOK, output)
120120
}
121121

@@ -214,6 +214,8 @@ func runTask(ctx context.Context, event any) (evt *TaskCompleteEvent) {
214214
wkfCtx := context.WithValue(it.Context(), "polycode.context", workflowCtx)
215215
it = it.WithContext(wkfCtx)
216216
it.URL.Path = path
217+
218+
println(fmt.Sprintf("client: invoke handler %s with session id %s", path, sessionId))
217219
resp := invokeHandler(httpHandler, it)
218220
return &TaskCompleteEvent{Output: TaskOutput{IsAsync: false, IsNull: false, Output: resp, Error: nil}}
219221
}

0 commit comments

Comments
 (0)