Beispiel #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))
Beispiel #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))
Beispiel #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))
Beispiel #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))