MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / sync_dir

Function sync_dir

tracker/dmlc_tracker/ssh.py:14–22  ·  view source on GitHub ↗

sync the working directory from root node into slave node

(local_dir, slave_node, slave_dir)

Source from the content-addressed store, hash-verified

12from . import tracker
13
14def sync_dir(local_dir, slave_node, slave_dir):
15 """
16 sync the working directory from root node into slave node
17 """
18 remote = slave_node[0] + ':' + slave_dir
19 logging.info('rsync %s -> %s', local_dir, remote)
20 prog = 'rsync -az --rsh="ssh -o StrictHostKeyChecking=no -p %s" %s %s' % (
21 slave_node[1], local_dir, remote)
22 subprocess.check_call([prog], shell = True)
23
24def get_env(pass_envs):
25 envs = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected