diff --git a/cosmos/models/Task.py b/cosmos/models/Task.py index efe8e93e..8c68cb8b 100644 --- a/cosmos/models/Task.py +++ b/cosmos/models/Task.py @@ -15,6 +15,7 @@ from .. import TaskStatus, StageStatus, signal_task_status_change from ..util.helpers import wait_for_file import datetime +import pprint opj = os.path.join @@ -33,9 +34,10 @@ class GetOutputError(Exception): pass task_failed_printout = u"""Failure Info: - - + + +{0.params_pformat} + {0.command_script_text} @@ -326,8 +328,12 @@ def url(self): def params_pretty(self): return '%s' % ', '.join('%s=%s' % (k, "'%s'" % v if isinstance(v, basestring) else v) for k, v in self.params.items()) + @property + def params_pformat(self): + return pprint.pformat(self.params, indent=2, width=1) + def __repr__(self): - return '' % (self.id or 'id_%s' % id(self), + return "" % (self.id or 'id_%s' % id(self), self.stage.name if self.stage else '', self.uid )