We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5013703 commit ab9193eCopy full SHA for ab9193e
ads/jobs/builders/infrastructure/dsc_job.py
@@ -655,6 +655,22 @@ def _check_and_print_status(self, prev_status) -> str:
655
print(f"{timestamp} - {status}")
656
return status
657
658
+ def wait(self, interval: float = SLEEP_INTERVAL):
659
+ """Waits for the job run until if finishes.
660
+
661
+ Parameters
662
+ ----------
663
+ interval : float
664
+ Time interval in seconds between each request to update the logs.
665
+ Defaults to 3 (seconds).
666
667
+ """
668
+ self.sync()
669
+ while self.status not in self.TERMINAL_STATES:
670
+ time.sleep(interval)
671
672
+ return self
673
674
def watch(
675
self,
676
interval: float = SLEEP_INTERVAL,
0 commit comments