Commit 95d3b15c by Őry Máté

dashboard: allow saving Profile if store timeouts

parent 5c732fe0
...@@ -48,7 +48,7 @@ from common.models import HumanReadableObject, create_readable, Encoder ...@@ -48,7 +48,7 @@ from common.models import HumanReadableObject, create_readable, Encoder
from vm.tasks.agent_tasks import add_keys, del_keys from vm.tasks.agent_tasks import add_keys, del_keys
from vm.models.instance import ACCESS_METHODS from vm.models.instance import ACCESS_METHODS
from .store_api import Store, NoStoreException, NotOkException from .store_api import Store, NoStoreException, NotOkException, Timeout
from .validators import connect_command_template_validator from .validators import connect_command_template_validator
logger = getLogger(__name__) logger = getLogger(__name__)
...@@ -346,7 +346,7 @@ def update_store_profile(sender, **kwargs): ...@@ -346,7 +346,7 @@ def update_store_profile(sender, **kwargs):
profile.disk_quota) profile.disk_quota)
except NoStoreException: except NoStoreException:
logger.debug("Store is not available.") logger.debug("Store is not available.")
except NotOkException: except (NotOkException, Timeout):
logger.critical("Store is not accepting connections.") logger.critical("Store is not accepting connections.")
......
...@@ -7,6 +7,7 @@ from datetime import datetime ...@@ -7,6 +7,7 @@ from datetime import datetime
from django.http import Http404 from django.http import Http404
from django.conf import settings from django.conf import settings
from requests import get, post, codes from requests import get, post, codes
from requests.exceptions import Timeout # noqa
from sizefield.utils import filesizeformat from sizefield.utils import filesizeformat
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment