(text, step)
| 339 | |
| 340 | @Printer.register(ExecutionStep) |
| 341 | def print_step(text, step): |
| 342 | proto = step.Proto() |
| 343 | step_ctx, do_substep = _get_step_context(step) |
| 344 | with text.context(step_ctx): |
| 345 | if proto.report_net: |
| 346 | with text.context(call('report_net', [proto.report_interval])): |
| 347 | text(step.get_net(proto.report_net)) |
| 348 | substeps = step.Substeps() + [step.get_net(n) for n in proto.network] |
| 349 | for substep in substeps: |
| 350 | sub_proto = ( |
| 351 | substep.Proto() if isinstance(substep, ExecutionStep) else None) |
| 352 | if sub_proto is not None and sub_proto.run_every_ms: |
| 353 | substep_ctx = call( |
| 354 | 'reporter', |
| 355 | [str(substep), ('interval_ms', sub_proto.run_every_ms)]) |
| 356 | elif do_substep: |
| 357 | title = ( |
| 358 | 'workspace' |
| 359 | if sub_proto is not None and sub_proto.create_workspace else |
| 360 | 'step') |
| 361 | substep_ctx = call(title, [str(substep)]) |
| 362 | else: |
| 363 | substep_ctx = None |
| 364 | with text.context(substep_ctx): |
| 365 | text(substep) |
| 366 | if proto.should_stop_blob: |
| 367 | text.add(call('yield stop_if', [proto.should_stop_blob])) |
| 368 | |
| 369 | |
| 370 | def _print_task_output(x): |
nothing calls this directly
no test coverage detected
searching dependent graphs…