Commit 34400b26 authored by kalman@chromium.org's avatar kalman@chromium.org

Devserver: catch ValueError in MemcacheObjectStore.SetMulti. This is being

triggered by writing large files into memcache - and for some reason there are
giant PSD files checked into extension samples.

NOTRY=true
BUG=233614
R=cduvall@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14188041

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195221 0039d316-1c4b-4281-b951-d872f2087c98
parent 4c625bb3
......@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from appengine_wrappers import memcache
from object_store import ObjectStore
......@@ -17,7 +19,11 @@ class MemcacheObjectStore(ObjectStore):
self._namespace = namespace
def SetMulti(self, mapping):
memcache.Client().set_multi_async(mapping, namespace=self._namespace)
try:
memcache.Client().set_multi_async(mapping, namespace=self._namespace)
except ValueError as e:
logging.error('Caught "ValueError: %s" when mapping keys %s' % (
e, mapping.keys()))
def GetMulti(self, keys):
rpc = memcache.Client().get_multi_async(keys, namespace=self._namespace)
......
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 to comment