示例#1
0
def addversion():
    req_arg = request.form.to_dict()
    hosts = req_arg.pop('hosts', zw.children.values())
    if isinstance(hosts, str):
        hosts = hosts.split(',')
    return jsonify(
        json_call(hosts, 'addversion.json', 'POST', req_arg, request.files))
示例#2
0
def schedule():
    req_arg = request.form.to_dict()
    hosts = req_arg.pop('hosts', zw.children.values())
    if isinstance(hosts, str):
        hosts = hosts.split(',')
    scrapyd_utils.version_check(hosts, req_arg['project'])
    return jsonify(json_call(hosts, 'schedule.json', 'POST', req_arg))
示例#3
0
def listjobs():
    req_arg = request.form.to_dict()
    hosts = req_arg.pop('hosts', zw.children.values())
    if isinstance(hosts, str):
        hosts = hosts.split(',')
    return jsonify(json_call(hosts, 'listjobs.json', 'GET', req_arg))
示例#4
0
def delproject():
    req_arg = request.form.to_dict()
    hosts = req_arg.pop('hosts', zw.children.values())
    if isinstance(hosts, str):
        hosts = hosts.split(',')
    return jsonify(json_call(hosts, 'delproject.json', 'POST', req_arg))