more status messages
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 1 Jul 2014 18:01:53 +0000 (14:01 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 1 Jul 2014 18:01:53 +0000 (14:01 -0400)
crunch_scripts/run-command

index 39357d4d9e54b516c8a916126e15f02ccd530e65..1351f3bfadbac51d94879046e5b0017774f72230 100755 (executable)
@@ -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)