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/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
    def record_state_change(self, task, prev_state, next_state, additional=None):
        # Done under self._lock (from _report_tasks()).
        self.task_state_counts[prev_state] = self.task_state_counts[prev_state] - 1
        self.task_state_counts[next_state] = self.task_state_counts[next_state] + 1
        self.job_pool.log(task, TASK_STATE_NAMES[next_state], additional)

src/c/i/ciel-HEAD/src/python/ciel/runtime/master/cluster_view.py   ciel(Download)
from ciel.runtime.master.job_pool import JOB_STATE_NAMES
from cherrypy._cperror import HTTPError
from ciel.runtime.task import TASK_STATES, TASK_STATE_NAMES
import cherrypy
import time
        task_string += '<body><table>'
        task_string += table_row('ID', task.task_id)
        task_string += table_row('State', TASK_STATE_NAMES[task.state])
        for worker in [task.get_worker()]:
            task_string += table_row('Worker', worker.netloc if worker is not None else None)
            task_string += span_row('Children')
            for i, child in enumerate(task.children):
                task_string += table_row(i, '%s</td><td>%s</td><td>%s' % (task_link(job, child), child.handler, TASK_STATE_NAMES[child.state]))
        task_string += '</table></body></html>'
        return task_string