Пример #1
0
def publish_spark_task_started_event(agent, task, name, tim, logger):
    try:
        args = getInputGoalParameters(agent, task)
        loginfo = LogInfo(name, task.objectId(), getTaskParentID(task), tim, ("Started", "Task"), args)
        logger.writeLog(loginfo)
    except Exception, e:
        debug("Error in Logging...", e)
Пример #2
0
def publish_spark_procedure_started_event(agent, tframe, name, tim, logger):
    try:
        event = tframe.event()
        eventtype = object_type(event)
        args = None
        if eventtype in ("spark.internal.repr.taskexpr.AchieveEvent", "spark.internal.repr.taskexpr.DoEvent"):
            args = getInputGoalParameters(agent, event)
        elif eventtype == "spark.pylang.defaultimp.AddFactEvent":
            args = getPredicateParameters(agent, event)
        loginfo = LogInfo(name, tframe.objectId(), event.objectId(), tim, ("Started", "Procedure"), args)
        logger.writeLog(loginfo)
    except Exception, e:
        debug("Error in Logging...", e)