Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

        def total_progress(jobs):
    complete_progress = len(jobs) * 100

    sum_progress = 0
    for job in jobs:
        sum_progress += job.progress

    return int(float(sum_progress) / float(complete_progress) * 100)
        


src/k/a/karesansui-HEAD/karesansui/gadget/msg.py   karesansui(Download)
from karesansui.lib.rest import Rest, auth
from karesansui.lib.const import MSG_LIMIT, DEFAULT_LANGS
from karesansui.lib.template import total_progress
from karesansui.db.model._2pysilhouette import JOBGROUP_STATUS
from karesansui.db.access._2pysilhouette import jg_findbyserial_limit
 
            msg['status'] = jg.status
            msg['progress'] = total_progress(jg.jobs)
            msg['created'] = jg.created
            msg['modified'] = jg.modified