mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fix runner to use global instance
This commit is contained in:
@@ -17,7 +17,6 @@ var (
|
|||||||
ErrAppsNothingToUpdate = errors.New("Nothing to update")
|
ErrAppsNothingToUpdate = errors.New("Nothing to update")
|
||||||
ErrAppsMissingNew = errors.New("Missing new application")
|
ErrAppsMissingNew = errors.New("Missing new application")
|
||||||
ErrUsableImage = errors.New("Image not found")
|
ErrUsableImage = errors.New("Image not found")
|
||||||
ErrNewRunnerDriver = errors.New("Error creating the runner driver")
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type App struct {
|
type App struct {
|
||||||
|
|||||||
@@ -38,13 +38,7 @@ func handleRouteCreate(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
run, err := runner.New()
|
err = Api.Runner.EnsureUsableImage(&runner.Config{
|
||||||
if err != nil {
|
|
||||||
c.JSON(http.StatusInternalServerError, simpleError(models.ErrNewRunnerDriver))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = run.EnsureUsableImage(&runner.Config{
|
|
||||||
Ctx: ctx,
|
Ctx: ctx,
|
||||||
Route: wroute.Route,
|
Route: wroute.Route,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user