Ejemplo n.º 1
0
def handle_request_main(req, filename = None):
    acl.try_reload()
    init_conf("src")
    status.push("handling email request")
    ret = handle_request(req, filename = filename)
    status.pop()
    return ret
Ejemplo n.º 2
0
def handle_request_main(req, filename=None):
    acl.try_reload()
    init_conf("src")
    status.push("handling email request")
    ret = handle_request(req, filename=filename)
    status.pop()
    return ret
Ejemplo n.º 3
0
def main():
    lck = lock.lock("request_fetcher", non_block = True)
    if lck == None:
        sys.exit(1)
    init_conf()
    acl.try_reload()

    status.push("fetching requests")
    if has_new(config.control_url):
        q = fetch_queue(config.control_url)
        max_no = 0
        q_new = []
        for r in q:
            if r.no > max_no:
                max_no = r.no
            if r.no > last_count:
                q_new.append(r)
        for b in config.binary_builders:
            handle_reqs(b, q_new)
        f = open(path.last_req_no_file, "w")
        f.write("%d\n" % max_no)
        f.close()
    status.pop()
    lck.close()
Ejemplo n.º 4
0
def main():
    lck = lock.lock("request_fetcher", non_block=True)
    if lck == None:
        sys.exit(1)
    init_conf()
    acl.try_reload()

    status.push("fetching requests")
    if has_new(config.control_url):
        q = fetch_queue(config.control_url)
        max_no = 0
        q_new = []
        for r in q:
            if r.no > max_no:
                max_no = r.no
            if r.no > last_count:
                q_new.append(r)
        for b in config.binary_builders:
            handle_reqs(b, q_new)
        f = open(path.last_req_no_file, "w")
        f.write("%d\n" % max_no)
        f.close()
    status.pop()
    lck.close()