コード例 #1
0
def discover_postprocessors():
    if app.config['mode'] != 'scanner':
        raise ApiException("Discovery only possible when running in 'scanner'"
                           " mode.", 503)
    servers = discover_servers()
    if app.config['postproc_server']:
        servers.append(app.config['postproc_server'].split(':'))
    return jsonify(servers=["{0}:{1}".format(*addr) for addr in servers])
コード例 #2
0
ファイル: web.py プロジェクト: 5up3rD4n1/spreads
def discover_postprocessors():
    if app.config['mode'] != 'scanner':
        raise ApiException("Discovery only possible when running in 'scanner'"
                           " mode.", 503)
    servers = discover_servers()
    if app.config['postproc_server']:
        servers.append(app.config['postproc_server'].split(':'))
    return jsonify(servers=["{0}:{1}".format(*addr) for addr in servers])
コード例 #3
0
def discover_postprocessors():
    """ Get list of available postprocessing servers on network.

    :resheader Content-Type:    :mimetype:`application/json`
    :<json array servers:       List of available server addresses
    """
    servers = discover_servers()
    if app.config['postprocessing_server']:
        servers.append(app.config['postprocessing_server'].split(':'))
    return jsonify(servers=["{0}:{1}".format(*addr) for addr in servers])
コード例 #4
0
ファイル: web.py プロジェクト: duerig/spreads
def discover_postprocessors():
    check_submit_allowed()
    servers = discover_servers()
    if app.config['postprocessing_server']:
        servers.append(app.config['postprocessing_server'].split(':'))
    return jsonify(servers=["{0}:{1}".format(*addr) for addr in servers])