[ARVADOS] created: 4689df784ce9702958361952b80f24076ea92039
git at public.curoverse.com
git at public.curoverse.com
Thu Jul 3 11:03:42 EDT 2014
at 4689df784ce9702958361952b80f24076ea92039 (commit)
commit 4689df784ce9702958361952b80f24076ea92039
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Jul 2 14:27:25 2014 -0400
Improve output messages a bit
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 9d4f361..6335523 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -50,24 +50,24 @@ try:
stdoutname = subst.do_substitution(p, p["stdout"])
stdoutfile = open(stdoutname, "wb")
- print("run-command {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
+ print("run-command: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
rcode = subprocess.call(cmd, stdout=stdoutfile)
- print("run-command completed with exit code %i" % rcode)
+ print("run-command: completed with exit code %i" % rcode)
except Exception as e:
- print("run-command exception: {}".format(e))
+ print("run-command: caught exception: {}".format(e))
finally:
for l in links:
os.unlink(l)
- print("run-command output:")
+ print("run-command: the follow output files will be saved to keep:")
- subprocess.call(["find", ".", "-type", "f", "-printf", "run-command %12.12s %h/%f\\n"])
+ subprocess.call(["find", ".", "-type", "f", "-printf", "run-command: %12.12s %h/%f\\n"])
- print("run-command writing to keep")
+ print("run-command: start writing output to keep")
out = arvados.CollectionWriter()
out.write_directory_tree(".", max_manifest_depth=0)
@@ -83,8 +83,8 @@ if rcode == 0:
os.chdir("..")
shutil.rmtree("tmpdir")
shutil.rmtree("output")
- print("run-command success")
+ print("run-command: success")
else:
- print("run-command failed")
+ print("run-command: failed")
sys.exit(rcode)
commit bcff555f9786f24ded842f1cf45e162f1a744c32
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 1 16:29:59 2014 -0400
fix find
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 3fcbe2a..9d4f361 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -65,7 +65,7 @@ finally:
print("run-command output:")
- subprocess.call(["find", ".", "-type", "f", "-printf", "run-command %12.12s %h/%f\\\n"])
+ subprocess.call(["find", ".", "-type", "f", "-printf", "run-command %12.12s %h/%f\\n"])
print("run-command writing to keep")
commit 7f67cf41cb8f834debddc5c2a26abdd72e6278d4
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 1 14:16:38 2014 -0400
More clever find
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 1351f3b..3fcbe2a 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -65,7 +65,7 @@ finally:
print("run-command output:")
- subprocess.call(["find", "."])
+ subprocess.call(["find", ".", "-type", "f", "-printf", "run-command %12.12s %h/%f\\\n"])
print("run-command writing to keep")
commit 3369c8fa24b8cb40c9f9da74a1744130e0aea83e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 1 14:01:53 2014 -0400
more status messages
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 39357d4..1351f3b 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -50,7 +50,7 @@ try:
stdoutname = subst.do_substitution(p, p["stdout"])
stdoutfile = open(stdoutname, "wb")
- print("run-command running: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
+ print("run-command {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
rcode = subprocess.call(cmd, stdout=stdoutfile)
@@ -63,6 +63,12 @@ finally:
for l in links:
os.unlink(l)
+ print("run-command output:")
+
+ subprocess.call(["find", "."])
+
+ print("run-command writing to keep")
+
out = arvados.CollectionWriter()
out.write_directory_tree(".", max_manifest_depth=0)
outuuid = out.finish()
@@ -77,5 +83,8 @@ if rcode == 0:
os.chdir("..")
shutil.rmtree("tmpdir")
shutil.rmtree("output")
+ print("run-command success")
+else:
+ print("run-command failed")
sys.exit(rcode)
commit 9cb30aa6a84d5b3c7a3ae0d4fc398d64cbd6c306
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 1 13:50:31 2014 -0400
Improve error messages
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index aa50cde..39357d4 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -50,12 +50,14 @@ try:
stdoutname = subst.do_substitution(p, p["stdout"])
stdoutfile = open(stdoutname, "wb")
- print("Running command: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
+ print("run-command running: {}{}".format(' '.join(cmd), (" > " + stdoutname) if stdoutname != None else ""))
rcode = subprocess.call(cmd, stdout=stdoutfile)
+ print("run-command completed with exit code %i" % rcode)
+
except Exception as e:
- print("Caught exception {}".format(e))
+ print("run-command exception: {}".format(e))
finally:
for l in links:
commit cb05caebb2978eb19a93e9156aafba71e9aaa82a
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 1 12:54:46 2014 -0400
Set success/failed flag explicitly based on return code.
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index a0c7cfe..aa50cde 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -56,7 +56,6 @@ try:
except Exception as e:
print("Caught exception {}".format(e))
- rcode = 1
finally:
for l in links:
@@ -64,7 +63,13 @@ finally:
out = arvados.CollectionWriter()
out.write_directory_tree(".", max_manifest_depth=0)
- arvados.current_task().set_output(out.finish())
+ outuuid = out.finish()
+ arvados.api('v1').job_tasks().update(uuid=arvados.current_task()['uuid'],
+ body={
+ 'output':outuuid,
+ 'success': (rcode == 0),
+ 'progress':1.0
+ }).execute()
if rcode == 0:
os.chdir("..")
commit 2456d3322ba8397401d5033e6509cf0ffc59f98e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Jul 1 10:23:09 2014 -0400
Make sure set return code non-zero.
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index 528baab..a0c7cfe 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -56,6 +56,7 @@ try:
except Exception as e:
print("Caught exception {}".format(e))
+ rcode = 1
finally:
for l in links:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list