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
    def add_runnable_task(self, task):
        if len(task.unfinished_input_streams) == 0:
            task.set_state(TASK_QUEUED)
        else:
            task.set_state(TASK_QUEUED_STREAMING)

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
                        if task is None:
                            break
                        elif task.state not in (TASK_QUEUED, TASK_QUEUED_STREAMING):
                            continue
                        task.set_worker(worker)
                    if task is None:
                        break
                    elif task.state not in (TASK_QUEUED, TASK_QUEUED_STREAMING):
                        continue
                    task.set_worker(worker)
    def select_workers_for_task(self, task):
        constrained_location = task.get_constrained_location()
        if constrained_location is not None:
            return [self.job_pool.worker_pool.get_worker_at_netloc(constrained_location)]
        elif task.state in (TASK_QUEUED_STREAMING, TASK_QUEUED, TASK_COMMITTED):