calling SYNC_USER setting directly
@@ -63,13 +63,12 @@ class RemoteSyncer(BaseSyncer):
Respects the ``MULTIPLE_APP_SERVERS`` setting when copying.
"""
- sync_user = settings.SYNC_USER
app_servers = settings.MULTIPLE_APP_SERVERS
if app_servers:
log.info('Remote Copy %s to %s on %s', path, target, app_servers)
for server in app_servers:
mkdir_cmd = (
- 'ssh {}@{} mkdir -p {}'.format(sync_user, server, target)
+ 'ssh {}@{} mkdir -p {}'.format(settings.SYNC_USER, server, target)
)
ret = os.system(mkdir_cmd)
if ret != 0:
@@ -83,7 +82,7 @@ class RemoteSyncer(BaseSyncer):
"rsync -e 'ssh -T' -av --delete {path}{slash} {user}@{server}:{target}".format(
path=path,
slash=slash,
- user=sync_user,
+ user=settings.SYNC_USER,
server=server,
target=target,
)
@@ -102,7 +101,6 @@ class DoubleRemotePuller(BaseSyncer):
Respects the ``MULTIPLE_APP_SERVERS`` setting when copying.
"""
- sync_user = settings.SYNC_USER
app_servers = settings.MULTIPLE_APP_SERVERS
if not is_file:
path += '/'
@@ -110,7 +108,7 @@ class DoubleRemotePuller(BaseSyncer):
for server in app_servers:
if not is_file:
mkdir_cmd = 'ssh {user}@{server} mkdir -p {target}'.format(
- user=sync_user,
+ user=settings.SYNC_USER,
server=server,
target=target,
)
@@ -123,7 +121,7 @@ class DoubleRemotePuller(BaseSyncer):
"--delete --exclude projects {user}@{host}:{path} {target}'".format(
host=host,
path=path,
- user=sync_user,
+ user=settings.SYNC_USER,
server=server,
target=target,
)
@@ -142,7 +140,6 @@ class RemotePuller(BaseSyncer):
Respects the ``MULTIPLE_APP_SERVERS`` setting when copying.
"""
- sync_user = settings.SYNC_USER
if not is_file:
path += '/'
log.info('Remote Pull %s to %s', path, target)
@@ -156,7 +153,7 @@ class RemotePuller(BaseSyncer):
sync_cmd = "rsync -e 'ssh -T' -av --delete {user}@{host}:{path} {target}".format(
host=host,
path=path,
- user=sync_user,
+ user=settings.SYNC_USER,
target=target,
)
ret = os.system(sync_cmd)
