Commit ca285bb
fix: poll job.status() once per job in Experiment.status() (#582)
Experiment.status() called job.status(runner=...) twice while building
one status row: once for the display text and again for the returned
dictionary. A backend failure therefore produced two identical ERROR
tracebacks per status request and wasted a redundant status poll.
Store the status in a local variable and reuse it for both the display
string and the dict.
Add a regression test that asserts job.status() is called exactly once
for both return_dict=True and the default print path.
Signed-off-by: Andrew White <andrewh@cdw.com>
Co-authored-by: oliver könig <okoenig@nvidia.com>1 parent 514d076 commit ca285bb
2 files changed
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
908 | 908 | | |
909 | 909 | | |
910 | 910 | | |
| 911 | + | |
911 | 912 | | |
912 | | - | |
913 | | - | |
914 | | - | |
| 913 | + | |
915 | 914 | | |
916 | 915 | | |
917 | 916 | | |
| |||
927 | 926 | | |
928 | 927 | | |
929 | 928 | | |
930 | | - | |
| 929 | + | |
931 | 930 | | |
932 | 931 | | |
933 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
687 | 711 | | |
688 | 712 | | |
689 | 713 | | |
| |||
0 commit comments