[ARVADOS] updated: 86e1e57cc9761e1a4f8f6ae9434e033a1ecd41d0
Git user
git at public.curoverse.com
Thu Oct 27 11:04:56 EDT 2016
Summary of changes:
services/workflow-importer/workflowimporter.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
via 86e1e57cc9761e1a4f8f6ae9434e033a1ecd41d0 (commit)
from dc2979a545f9b9f62cbaa7d8df4b566aac3835b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 86e1e57cc9761e1a4f8f6ae9434e033a1ecd41d0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Oct 27 11:04:47 2016 -0400
10344: Use logger
diff --git a/services/workflow-importer/workflowimporter.py b/services/workflow-importer/workflowimporter.py
index f48e711..ab72bf1 100755
--- a/services/workflow-importer/workflowimporter.py
+++ b/services/workflow-importer/workflowimporter.py
@@ -8,12 +8,20 @@ import shutil
import argparse
import StringIO
import urlparse
+import logging
import arvados
import arvados.commands.keepdocker as keepdocker
import arvados.commands.arv_copy as arv_copy
import arvados_cwl
+_logger = logging.getLogger("workflowimporter")
+
+defaultStreamHandler = logging.StreamHandler()
+_logger.addHandler(defaultStreamHandler)
+_logger.setLevel(logging.INFO)
+
+
def registerDocker((api, reporecord, prefix, branch), dirname, names):
sp = urlparse.urlsplit(reporecord["name"])
name = sp.path
@@ -61,7 +69,7 @@ def registerCWL((api, reporecord, prefix, branch), dirname, names):
rval = arvados_cwl.main(["--update-workflow="+uuid, cwlfile], stdout, stderr)
if rval != 0:
raise Exception(stderr.getvalue())
- print "Updated workflow", uuid
+ _logger.info("Updated workflow %s", uuid)
else:
rval = arvados_cwl.main(["--create-workflow", cwlfile], stdout, stderr)
if rval != 0:
@@ -70,7 +78,7 @@ def registerCWL((api, reporecord, prefix, branch), dirname, names):
"tail_uuid": reporecord["uuid"],
"head_uuid": stdout.getvalue().strip(),
"name": branch}).execute()
- print "Created workflow", wf["uuid"]
+ -logger.info("Created workflow %s", stdout.getvalue().strip())
def gitclone(api, repo, insecure_http):
if not (repo.startswith("http://") or repo.startswith("https://") or repo.startswith("/")):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list