def __init__(self, job): super(Evaluator, self).__init__( evaluators=( evaluators.TaskPayloadLiftingEvaluator(), evaluators.FilteringEvaluator( predicate=evaluators.All( evaluators.TaskTypeEq('find_isolate'), evaluators.TaskIsEventTarget(), evaluators.Not( evaluators.TaskStatusIn( {'completed', 'failed', 'cancelled'})), ), delegate=evaluators.DispatchByEventTypeEvaluator({ 'initiate': InitiateEvaluator(job), 'update': UpdateEvaluator(job), })), ))
def __init__(self, job): super(Evaluator, self).__init__(evaluators=( evaluators.TaskPayloadLiftingEvaluator(), evaluators.FilteringEvaluator( predicate=evaluators.All( evaluators.TaskTypeEq('run_test'), evaluators.TaskIsEventTarget(), ), delegate=evaluators.DispatchByEventTypeEvaluator({ 'initiate': evaluators.FilteringEvaluator(predicate=evaluators.Not( evaluators.TaskStatusIn( {'ongoing', 'failed', 'completed'})), delegate=InitiateEvaluator( job)), 'update': evaluators.FilteringEvaluator( predicate=evaluators.TaskStatusIn({'ongoing'}), delegate=UpdateEvaluator(job)), })), ))