Commit 0fe2c879 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

experiments: introduce send_file in executor

(preparation for remote commands)
parent 8c910d9c
...@@ -202,6 +202,8 @@ class Executor(object): ...@@ -202,6 +202,8 @@ class Executor(object):
async def await_file(self, path, delay=0.05, verbose=False): async def await_file(self, path, delay=0.05, verbose=False):
raise NotImplementedError("Please Implement this method") raise NotImplementedError("Please Implement this method")
async def send_file(self, path, verbose=False):
raise NotImplementedError("Please Implement this method")
# runs the list of commands as strings sequentially # runs the list of commands as strings sequentially
async def run_cmdlist(self, label, cmds, verbose=True, host=None): async def run_cmdlist(self, label, cmds, verbose=True, host=None):
...@@ -221,3 +223,7 @@ class LocalExecutor(Executor): ...@@ -221,3 +223,7 @@ class LocalExecutor(Executor):
print('await_file(%s)' % path) print('await_file(%s)' % path)
while not os.path.exists(path): while not os.path.exists(path):
await asyncio.sleep(delay) await asyncio.sleep(delay)
async def send_file(self, path, verbose):
# locally we do not need to do anything
pass
\ No newline at end of file
...@@ -66,6 +66,7 @@ class Experiment(object): ...@@ -66,6 +66,7 @@ class Experiment(object):
if verbose: if verbose:
print('preparing config tar:', path) print('preparing config tar:', path)
host.node_config.make_tar(path) host.node_config.make_tar(path)
await exec.send_file(path, verbose)
# prepare all simulators in parallel # prepare all simulators in parallel
sims = [] sims = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment