Merge branch '2.0' into 2.1

This commit is contained in:
Julien Duponchelle 2017-05-16 08:38:13 +02:00
commit bef1b2e8f1
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 6 additions and 1 deletions

View File

@ -529,7 +529,7 @@ class Compute:
raise aiohttp.web.HTTPForbidden(text=msg)
elif response.status == 404:
raise aiohttp.web.HTTPNotFound(text="{} {} not found".format(method, path))
elif response.status == 408:
elif response.status == 408 or response.status == 504:
raise aiohttp.web.HTTPRequestTimeout(text="{} {} request timeout".format(method, path))
elif response.status == 409:
try:

View File

@ -33,6 +33,7 @@ from .route import Route
from ..config import Config
from ..compute import MODULES
from ..compute.port_manager import PortManager
from ..compute.qemu import Qemu
from ..controller import Controller
@ -192,6 +193,10 @@ class WebServer:
Called when the HTTP server start
"""
yield from Controller.instance().start()
# Because with a large image collection
# without md5sum already computed we start the
# computing with server start
asyncio.async(Qemu.instance().list_images())
def run(self):
"""