diff options
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
| -rw-r--r-- | geo-replication/syncdaemon/resource.py | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 7daf7e49211..ecb94d56c7f 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -1003,8 +1003,10 @@ class SlaveRemote(object):              (boolify(gconf.sync_acls) and ['--acls'] or []) + \              ['.'] + list(args) -        if boolify(gconf.configinterface.get_realtime( -                "log_rsync_performance")): +        log_rsync_performance = boolify(gconf.configinterface.get_realtime( +            "log_rsync_performance", default_value=False)) + +        if log_rsync_performance:              # use stdout=PIPE only when log_rsync_performance enabled              # Else rsync will write to stdout and nobody is their              # to consume. If PIPE is full rsync hangs. @@ -1023,8 +1025,7 @@ class SlaveRemote(object):              for errline in stderr.strip().split("\n")[:-1]:                  logging.error("SYNC Error(Rsync): %s" % errline) -        if boolify(gconf.configinterface.get_realtime( -                "log_rsync_performance")): +        if log_rsync_performance:              rsync_msg = []              for line in stdout.split("\n"):                  if line.startswith("Number of files:") or \  | 
