MCPcopy
hub / github.com/sartography/SpiffWorkflow / get_dump

Method get_dump

SpiffWorkflow/task.py:416–433  ·  view source on GitHub ↗

Returns the subtree as a string for debugging. Returns: str: a tree view of the task (and optionally its children)

(self, indent=0, recursive=True)

Source from the content-addressed store, hash-verified

414 # I will probably remove these methods at some point because I hate them
415
416 def get_dump(self, indent=0, recursive=True):
417 """Returns the subtree as a string for debugging.
418
419 Returns:
420 str: a tree view of the task (and optionally its children)
421 """
422 dbg = (' ' * indent * 2)
423 dbg += '%s/' % self.id
424 dbg += '%s:' % self.thread_id
425 dbg += ' Task of %s' % self.task_spec.name
426 if self.task_spec.description:
427 dbg += ' (%s)' % self.task_spec.description
428 dbg += ' State: %s' % TaskState.get_name(self._state)
429 dbg += ' Children: %s' % len(self.children)
430 if recursive:
431 for child in self.children:
432 dbg += '\n' + child.get_dump(indent + 1)
433 return dbg
434
435 def dump(self, indent=0):
436 """Prints the subtree as a string for debugging."""

Callers 6

dumpMethod · 0.95
testTreeMethod · 0.95
doPickleSingleMethod · 0.45
save_restoreMethod · 0.45
_do_testMethod · 0.45

Calls 1

get_nameMethod · 0.45

Tested by 5

testTreeMethod · 0.76
doPickleSingleMethod · 0.36
save_restoreMethod · 0.36
_do_testMethod · 0.36