Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/e/r/erp5-HEAD/product/CMFActivity/Activity/SQLBase.py   erp5(Download)
from Products.CMFActivity.ActivityTool import (
  Message, MESSAGE_NOT_EXECUTED, MESSAGE_EXECUTED)
from Products.CMFActivity.ActiveObject import INVOKE_ERROR_STATE
from Products.CMFActivity.ActivityRuntimeEnvironment import (
  DEFAULT_MAX_RETRY, ActivityRuntimeEnvironment, getTransactionalVariable)
      try:
        activity_tool.SQLBase_assignMessage(table=self.sql_table,
          uid=final_error_uid_list, processing_node=INVOKE_ERROR_STATE)
      except:
        self._log(ERROR, 'Failed to set message to error state for %r'

src/e/r/erp5-HEAD/product/CMFActivity/ActiveProcess.py   erp5(Download)
from Products.ERP5Type.ConflictFree import ConflictFreeLog
from BTrees.Length import Length
from Products.CMFActivity.ActiveObject import INVOKE_ERROR_STATE
from random import randrange
from .ActiveResult import ActiveResult
  def hasErrorActivity(self, **kw):
    """
      Tells if some attached activities are in a error 
    """
    return self.hasActivity(processing_node = INVOKE_ERROR_STATE)

src/e/r/erp5-HEAD/product/CMFActivity/tests/testCMFActivity.py   erp5(Download)
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.Base import Base
from Products.CMFActivity.ActiveObject import INVOKE_ERROR_STATE
from Products.CMFActivity.Activity.Queue import VALIDATION_ERROR_DELAY
from Products.CMFActivity.Activity.SQLDict import SQLDict
      finished = 1
      for message in activity_tool.getMessageList():
        if message.processing_node != INVOKE_ERROR_STATE:
          finished = 0
 
    self.assertEqual(len(activity_tool.getMessageList()), 1)
    self.assertEqual(activity_tool.getMessageList()[0].processing_node, 
                      INVOKE_ERROR_STATE)
 
    # Make sure that persistent objects are not present in the connection
          self.assertTrue('OID mismatch' in mail, mail)
          m, = activity_tool.getMessageList()
          self.assertEqual(m.processing_node, INVOKE_ERROR_STATE)
          obj.flushActivity()
          obj.activate(**kw).getId()