rebase/merging runner

This commit is contained in:
Henrique Chehad
2016-08-22 18:21:59 -03:00
parent f0b264fa9c
commit e11a1896fd
2 changed files with 13 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/iron-io/functions/api/models"
"github.com/iron-io/functions/api/runner"
titancommon "github.com/iron-io/titan/common"
)
@@ -37,6 +38,17 @@ func handleRouteCreate(c *gin.Context) {
return
}
run := runner.New(&runner.Config{
Ctx: ctx,
Route: wroute.Route,
})
err = run.EnsureUsableImage()
if err != nil {
c.JSON(http.StatusInternalServerError, simpleError(models.ErrUsableImage))
return
}
app, err := Api.Datastore.GetApp(wroute.Route.AppName)
if err != nil {
log.WithError(err).Error(models.ErrAppsGet)