Did I find the right examples for you? yes no

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

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/lazy_task_pool.py   ciel(Download)
from ciel.public.references import SW2_FutureReference, \
    SWErrorReference, combine_references, SW2_StreamReference
from ciel.runtime.task import TASK_CREATED, TASK_BLOCKING, TASK_RUNNABLE, \
    TASK_COMMITTED, build_taskpool_task_from_descriptor, TASK_QUEUED, TASK_FAILED, TASK_QUEUED_STREAMING
from threading import Lock
                #      retries in case the task is *causing* the failures.
                if task.current_attempt > 3:
                    task.set_state(TASK_FAILED)
                    should_notify_outputs = True
                else:
                    ciel.log.error('Rescheduling task %s after worker failure' % task.task_id, 'TASKPOOL', logging.WARNING)
                    task.set_state(TASK_FAILED)
                # A hard error, so kill the entire job, citing the problem.
                worker = task.worker
                task.set_state(TASK_FAILED)
                should_notify_outputs = True
 
    def handle_missing_input(self, task):
        task.set_state(TASK_FAILED)
 
        # Assume that all of the dependencies are unavailable.
        task.convert_dependencies_to_futures()

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/job_pool.py   ciel(Download)
from cherrypy.process import plugins
from ciel.public.references import SWReferenceJSONEncoder
from ciel.runtime.task import TASK_STATES, TASK_STATE_NAMES, \
    build_taskpool_task_from_descriptor, TASK_QUEUED, TASK_FAILED,\
    TASK_COMMITTED, TASK_QUEUED_STREAMING
            #      retries in case the task is *causing* the failures.
            if task.current_attempt > 3:
                task.set_state(TASK_FAILED)
                should_notify_outputs = True
            else:
                ciel.log.error('Rescheduling task %s after worker failure' % task.task_id, 'TASKFAIL', logging.WARNING)
                task.set_state(TASK_FAILED)
        elif reason == 'RUNTIME_EXCEPTION':
            # A hard error, so kill the entire job, citing the problem.
            task.set_state(TASK_FAILED)
            should_notify_outputs = True
 
    def handle_missing_input(self, task):
        task.set_state(TASK_FAILED)
 
        # Assume that all of the dependencies are unavailable.
        task.convert_dependencies_to_futures()