mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
async calls return the call_id/task_id
This commit is contained in:
@@ -86,6 +86,7 @@ func (s *Server) UseSpecialHandlers(ginC *gin.Context) error {
|
||||
|
||||
func (s *Server) handleRunnerRequest(c *gin.Context) {
|
||||
enqueue := func(task *models.Task) (*models.Task, error) {
|
||||
c.JSON(http.StatusAccepted, map[string]string{"call_id": task.ID})
|
||||
return s.MQ.Push(task)
|
||||
}
|
||||
handleRequest(c, enqueue)
|
||||
|
||||
Reference in New Issue
Block a user