'A better copy command that works from the webs.
Respects the ``MULTIPLE_APP_SERVERS`` setting when copying.'

@classmethod
def copy(cls, path, target, host, is_file=False, **__):

    sync_user = getattr(settings, 'SYNC_USER', getpass.getuser())
    app_servers = getattr(settings, 'MULTIPLE_APP_SERVERS', [])
    if (not is_file):
        path += '/'
    log.info('Remote    Copy    %s    to    %s', path, target)
    for server in app_servers:
        if (not is_file):
            mkdir_cmd = 'ssh    {user}@{server}    mkdir    -p    {target}'.format(user=sync_user, server=server, target=target)
            ret = os.system(mkdir_cmd)
            if (ret != 0):
                log.info('MKDIR    ERROR    to    app    servers:')
                log.info(mkdir_cmd)
        sync_cmd = "ssh    {user}@{server}    'rsync    -av    --delete    {user}@{host}:{path}    {target}'".format(host=host, path=path, user=sync_user, server=server, target=target)
        ret = os.system(sync_cmd)
        if (ret != 0):
            log.info('COPY    ERROR    to    app    servers.')
            log.info(sync_cmd)
