Skip to content

Commit ed32c31

Browse files
committed
Add comments
1 parent 81545c0 commit ed32c31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

databricks/sdk/mixins/jobs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def get_run(self,
3636
# When querying a ForEach task run, a page token is returned when there are more than 100 iterations. Only a single task is returned, corresponding to the ForEach task itself. Therefore, the client only reads the iterations from the next page and not the tasks.
3737
is_paginating_iterations = run.iterations is not None and len(run.iterations) > 0
3838

39+
# runs/get response includes next_page_token as long as there are more pages to fetch.
3940
while run.next_page_token is not None:
4041
next_run = super().get_run(run_id,
4142
include_history=include_history,
@@ -45,6 +46,7 @@ def get_run(self,
4546
run.iterations.extend(next_run.iterations)
4647
else:
4748
run.tasks.extend(next_run.tasks)
49+
# Each new page of runs/get response includes the next page of the job_clusters, job_parameters, and repair history.
4850
run.job_clusters.extend(next_run.job_clusters)
4951
run.job_parameters.extend(next_run.job_parameters)
5052
run.repair_history.extend(next_run.repair_history)

0 commit comments

Comments
 (0)