Skip to content

Commit 9391c8c

Browse files
committed
Extra logging ... probably don't want exactly this.
1 parent cc7e9ad commit 9391c8c

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

planemo/galaxy/activity.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@
3535
def execute(ctx, config, runnable, job_path, **kwds):
3636
"""Execute a Galaxy activity."""
3737
try:
38-
return _execute(ctx, config, runnable, job_path, **kwds)
38+
rval = _execute(ctx, config, runnable, job_path, **kwds)
39+
ctx.vlog("execute complete...")
40+
return rval
3941
except Exception as e:
42+
ctx.vlog("execute failed...")
43+
import sys
44+
import traceback
45+
exc_type, exc_value, exc_traceback = sys.exc_info()
46+
traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
47+
traceback.print_exc()
4048
return ErrorRunResponse(str(e))
4149

4250

@@ -87,6 +95,8 @@ def _execute(ctx, config, runnable, job_path, **kwds):
8795
elif runnable.type in [RunnableType.galaxy_workflow, RunnableType.cwl_workflow]:
8896
response_class = GalaxyWorkflowRunResponse
8997
workflow_id = config.workflow_id(runnable.path)
98+
with open("imported_workflow.json", "w") as f:
99+
json.dump(user_gi.workflows.export_workflow_dict(workflow_id), f)
90100
ctx.vlog("Found Galaxy workflow ID [%s] for path [%s]" % (workflow_id, runnable.path))
91101
# TODO: update bioblend to allow inputs_by.
92102
# invocation = user_gi.worklfows.invoke_workflow(
@@ -378,6 +388,7 @@ def outputs_dict(self):
378388
def download_output_to(self, dataset_details, output_directory):
379389
file_name = dataset_details.get("cwl_file_name") or dataset_details.get("name")
380390
destination = os.path.join(output_directory, file_name)
391+
self._ctx.vlog("download for [%s]" % dataset_details)
381392
self._user_gi.histories.download_dataset(
382393
self._history_id,
383394
dataset_details["id"],

0 commit comments

Comments
 (0)