Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
old_mpath = old_metric.replace('.', '/') + "." + "wsp"
new_mpath = new_metric.replace('.', '/') + "." + "wsp"
metrics_to_sync.append((old_mpath, new_mpath))
if total_metrics % batch_size == 0:
print "* Running batch %s-%s" \
% (total_metrics-batch_size+1, total_metrics)
run_batch(metrics_to_sync, remote,
args.storage_dir, args.rsync_options)
metrics_to_sync = []
if len(metrics_to_sync) > 0:
print "* Running batch %s-%s" \
% (total_metrics-len(metrics_to_sync)+1, total_metrics)
run_batch(metrics_to_sync, remote,
args.storage_dir, args.rsync_options)
elapsed = (time() - start)
print ""
print "* Sync Report"
print " ========================================"
print " Total metrics synced: %s" % total_metrics
print " Total time: %ss" % elapsed
old_mpath = old_metric.replace('.', '/') + "." + "wsp"
new_mpath = new_metric.replace('.', '/') + "." + "wsp"
metrics_to_sync.append((old_mpath, new_mpath))
if total_metrics % batch_size == 0:
print "* Running batch %s-%s" \
% (total_metrics-batch_size+1, total_metrics)
run_batch(metrics_to_sync, remote,
args.storage_dir, args.rsync_options)
metrics_to_sync = []
if len(metrics_to_sync) > 0:
print "* Running batch %s-%s" \
% (total_metrics-len(metrics_to_sync)+1, total_metrics)
run_batch(metrics_to_sync, remote,
args.storage_dir, args.rsync_options)
elapsed = (time() - start)
print ""
print "* Sync Report"
print " ========================================"
print " Total metrics synced: %s" % total_metrics
print " Total time: %ss" % elapsed