Commit 46048103 authored by Sebastien Robin's avatar Sebastien Robin

add convenient method to get a memcachedict for distribution

parent 5d92285c
......@@ -275,3 +275,12 @@ class TaskDistributionTool(BaseTool):
portal = self.getPortalObject()
test_result = portal.restrictedTraverse(test_result_path)
return test_result.getSimulationState() == "started" and 1 or 0
security.declareObjectProtected(Permissions.AccessContentsInformation)
def getMemcachedDict(self):
""" Return a dictionary used for non persistent data related to distribution
"""
portal = self.getPortalObject()
memcached_dict = portal.portal_memcached.getMemcachedDict(
"task_distribution", "default_memcached_plugin")
return memcached_dict
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