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")
|
||||
ErrAppsMissingNew = errors.New("Missing new application")
|
||||
ErrUsableImage = errors.New("Image not found")
|
||||
ErrNewRunnerDriver = errors.New("Error creating the runner driver")
|
||||
)
|
||||
|
||||
type App struct {
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user