Commit 9d356026 authored by Romain Courteaud's avatar Romain Courteaud

[ERP5] Mark most Task Distribution logs as DEBUG

parent 6272a90c
...@@ -34,7 +34,7 @@ import itertools ...@@ -34,7 +34,7 @@ import itertools
from copy import deepcopy from copy import deepcopy
import random import random
import string import string
from zLOG import LOG,INFO,ERROR from zLOG import LOG,DEBUG,ERROR
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
...@@ -391,7 +391,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -391,7 +391,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
to_delete_key_list = [x for x,y in config.items() if y==None] to_delete_key_list = [x for x,y in config.items() if y==None]
[config.pop(x) for x in to_delete_key_list] [config.pop(x) for x in to_delete_key_list]
config_list.append(config) config_list.append(config)
LOG('ERP5ProjectUnitTestDistributor.startTestSuite, config_list',INFO,config_list) LOG('ERP5ProjectUnitTestDistributor.startTestSuite, config_list',DEBUG,config_list)
if batch_mode: if batch_mode:
return config_list return config_list
return json.dumps(config_list) return json.dumps(config_list)
...@@ -402,7 +402,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -402,7 +402,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
""" """
Here this is only a proxy to the task distribution tool Here this is only a proxy to the task distribution tool
""" """
LOG('ERP5ProjectUnitTestDistributor.createTestResult', 0, (node_title, test_title)) LOG('ERP5ProjectUnitTestDistributor.createTestResult', DEBUG, (node_title, test_title))
portal = self.getPortalObject() portal = self.getPortalObject()
if node_title: if node_title:
test_node = self._getTestNodeFromTitle(node_title) test_node = self._getTestNodeFromTitle(node_title)
...@@ -452,7 +452,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -452,7 +452,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
""" """
Here this is only a proxy to the task distribution tool Here this is only a proxy to the task distribution tool
""" """
LOG('ERP5ProjectUnitTestDistributor.startUnitTest', 0, test_result_path) LOG('ERP5ProjectUnitTestDistributor.startUnitTest', DEBUG, test_result_path)
portal = self.getPortalObject() portal = self.getPortalObject()
return portal.portal_task_distribution.startUnitTest(test_result_path,exclude_list, return portal.portal_task_distribution.startUnitTest(test_result_path,exclude_list,
node_title=node_title) node_title=node_title)
...@@ -462,7 +462,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject): ...@@ -462,7 +462,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
""" """
Here this is only a proxy to the task distribution tool Here this is only a proxy to the task distribution tool
""" """
LOG('ERP5ProjectUnitTestDistributor.stop_unit_test', 0, test_path) LOG('ERP5ProjectUnitTestDistributor.stop_unit_test', DEBUG, test_path)
portal = self.getPortalObject() portal = self.getPortalObject()
return portal.portal_task_distribution.stopUnitTest(test_path, status_dict, return portal.portal_task_distribution.stopUnitTest(test_path, status_dict,
node_title=node_title) node_title=node_title)
......
...@@ -32,7 +32,7 @@ from AccessControl import ClassSecurityInfo ...@@ -32,7 +32,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, NegatedQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, NegatedQuery
from zLOG import LOG from zLOG import LOG, DEBUG
from xmlrpclib import Binary from xmlrpclib import Binary
class TaskDistributionTool(BaseTool): class TaskDistributionTool(BaseTool):
...@@ -88,7 +88,7 @@ class TaskDistributionTool(BaseTool): ...@@ -88,7 +88,7 @@ class TaskDistributionTool(BaseTool):
-> (test_result_path, revision) or None if already completed -> (test_result_path, revision) or None if already completed
""" """
LOG('createTestResult', 0, (name, revision, test_title, project_title)) LOG('createTestResult', DEBUG, (name, revision, test_title, project_title))
portal = self.getPortalObject() portal = self.getPortalObject()
if test_title is None: if test_title is None:
test_title = name test_title = name
...@@ -250,7 +250,7 @@ class TaskDistributionTool(BaseTool): ...@@ -250,7 +250,7 @@ class TaskDistributionTool(BaseTool):
- status_dict (dict) - status_dict (dict)
""" """
status_dict = self._extractXMLRPCDict(status_dict) status_dict = self._extractXMLRPCDict(status_dict)
LOG("TaskDistributionTool.stopUnitTest", 0, repr((test_path,status_dict))) LOG("TaskDistributionTool.stopUnitTest", DEBUG, repr((test_path,status_dict)))
portal = self.getPortalObject() portal = self.getPortalObject()
line = portal.restrictedTraverse(test_path) line = portal.restrictedTraverse(test_path)
test_result = line.getParentValue() test_result = line.getParentValue()
...@@ -273,7 +273,7 @@ class TaskDistributionTool(BaseTool): ...@@ -273,7 +273,7 @@ class TaskDistributionTool(BaseTool):
"""report failure when a node can not handle task """report failure when a node can not handle task
""" """
status_dict = self._extractXMLRPCDict(status_dict) status_dict = self._extractXMLRPCDict(status_dict)
LOG("TaskDistributionTool.reportTaskFailure", 0, repr((test_result_path, LOG("TaskDistributionTool.reportTaskFailure", DEBUG, repr((test_result_path,
status_dict))) status_dict)))
portal = self.getPortalObject() portal = self.getPortalObject()
test_result = portal.restrictedTraverse(test_result_path) test_result = portal.restrictedTraverse(test_result_path)
...@@ -316,7 +316,7 @@ class TaskDistributionTool(BaseTool): ...@@ -316,7 +316,7 @@ class TaskDistributionTool(BaseTool):
"""report status of node """report status of node
""" """
status_dict = self._extractXMLRPCDict(status_dict) status_dict = self._extractXMLRPCDict(status_dict)
LOG("TaskDistributionTool.reportTaskStatus", 0, repr((test_result_path, LOG("TaskDistributionTool.reportTaskStatus", DEBUG, repr((test_result_path,
status_dict))) status_dict)))
portal = self.getPortalObject() portal = self.getPortalObject()
test_result = portal.restrictedTraverse(test_result_path) test_result = portal.restrictedTraverse(test_result_path)
...@@ -329,7 +329,7 @@ class TaskDistributionTool(BaseTool): ...@@ -329,7 +329,7 @@ class TaskDistributionTool(BaseTool):
def isTaskAlive(self, test_result_path): def isTaskAlive(self, test_result_path):
"""check status of a test suite """check status of a test suite
""" """
LOG("TaskDistributionTool.checkTaskStatus", 0, repr(test_result_path)) LOG("TaskDistributionTool.checkTaskStatus", DEBUG, repr(test_result_path))
portal = self.getPortalObject() portal = self.getPortalObject()
test_result = portal.restrictedTraverse(test_result_path) test_result = portal.restrictedTraverse(test_result_path)
return test_result.getSimulationState() == "started" and 1 or 0 return test_result.getSimulationState() == "started" and 1 or 0
......
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