mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
server.New signature changes and test fixes. (#324)
* ctx middleware should always be the first added to router * plugable enqueue func, changed server.New signature * fix tests * remove ctx/ctx.Done from server
This commit is contained in:
@@ -176,8 +176,9 @@ func (s *Server) handleRequest(c *gin.Context, enqueue models.Enqueue) {
|
||||
task.EnvVars = cfg.Env
|
||||
task.Payload = string(pl)
|
||||
// Push to queue
|
||||
enqueue(task)
|
||||
enqueue(ctx, s.MQ, task)
|
||||
log.Info("Added new task to queue")
|
||||
c.JSON(http.StatusAccepted, map[string]string{"call_id": task.ID})
|
||||
|
||||
default:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user