fix runner to use global instance

This commit is contained in:
Henrique Chehad
2016-08-22 20:12:02 -03:00
parent 148d52c890
commit 459620f9b4
2 changed files with 1 additions and 8 deletions

View File

@@ -38,13 +38,7 @@ func handleRouteCreate(c *gin.Context) {
return
}
run, err := runner.New()
if err != nil {
c.JSON(http.StatusInternalServerError, simpleError(models.ErrNewRunnerDriver))
return
}
err = run.EnsureUsableImage(&runner.Config{
err = Api.Runner.EnsureUsableImage(&runner.Config{
Ctx: ctx,
Route: wroute.Route,
})