def _curl(port):
    endpoint = "http://localhost:{}".format(port)

    with hide('running', 'stdout', 'stderr', 'warnings'):
        return fabrun(
            "curl -LI {} -o /dev/null -w '%{{http_code}}\n' -s".format(
                endpoint))
Beispiel #2
0
    def _check_status():
        oldout = sys.stdout
        sys.stdout = StringIO()
        try:
            output = fabrun('pip freeze')
        finally:
            sys.stdout = oldout

        sys.stdout.write('installed:\n\n')
        for package in output.split('\n'):
            print('  * ' + package)
Beispiel #3
0
    def _check_status():
        oldout = sys.stdout
        sys.stdout = StringIO()
        try:
            output = fabrun('pip freeze')
        finally:
            sys.stdout = oldout

        sys.stdout.write('installed:\n\n')
        for package in output.split('\n'):
            print('  * ' + package)
Beispiel #4
0
def backdb():
    """将数据库中的表结构和数据提取为sql文件"""
    env.host_string = "localhost"
    fabrun("mysqldump -uroot -p xcz > /var/www/xichuangzhu/xcz.sql")
Beispiel #5
0
def run(*args, **kwargs):
    '''run commandline either locally or online depending on the ONLINE global variable'''
    if ONLINE:
        return fabrun(*args, **kwargs)
    return local(*args, **kwargs)
Beispiel #6
0
def backdb():
    """将数据库中的表结构和数据提取为sql文件"""
    env.host_string = "localhost"
    fabrun("mysqldump -uroot -p xcz > /var/www/xichuangzhu/xcz.sql")
Beispiel #7
0
def run(*args, **kwargs):
    '''run commandline either locally or online depending on the ONLINE global variable'''
    if ONLINE:
        return fabrun(*args, **kwargs)
    return local(*args, **kwargs)