Time limit needs to be passed to async_wrapper.

This commit is contained in:
Michael DeHaan 2012-03-03 12:45:55 -05:00
parent a06d8859fa
commit 45c40524ef
2 changed files with 4 additions and 3 deletions

View file

@ -221,7 +221,7 @@ class Runner(object):
async = self._transfer_module(conn, tmp, 'async_wrapper') async = self._transfer_module(conn, tmp, 'async_wrapper')
module = self._transfer_module(conn, tmp, self.module_name) module = self._transfer_module(conn, tmp, self.module_name)
new_args = [] new_args = []
new_args = [ self.generated_jid, module ] new_args = [ self.generated_jid, module, self.background ]
new_args.extend(self.module_args) new_args.extend(self.module_args)
result = self._execute_module(conn, tmp, async, new_args) result = self._execute_module(conn, tmp, async, new_args)
return self._return_from_module(conn, host, result) return self._return_from_module(conn, host, result)

View file

@ -32,13 +32,14 @@ import traceback
if len(sys.argv) < 3: if len(sys.argv) < 3:
print json.dumps({ print json.dumps({
"failed" : True, "failed" : True,
"msg" : "usage: async_wrapper <jid> <module_script> <args>. Humans, do not call directly!" "msg" : "usage: async_wrapper <jid> <module_script> <time_limit> <args>. Humans, do not call directly!"
}) })
sys.exit(1) sys.exit(1)
jid = sys.argv[1] jid = sys.argv[1]
wrapped_module = sys.argv[2] wrapped_module = sys.argv[2]
args = sys.argv[3:] time_limit = sys.argv[3]
args = sys.argv[4:]
cmd = "%s %s" % (wrapped_module, " ".join(args)) cmd = "%s %s" % (wrapped_module, " ".join(args))