@@ -165,19 +165,22 @@ def find_runs_by_status_and_time_range(
165
165
status : List [AtlanWorkflowPhase ],
166
166
started_at : Optional [str ] = None ,
167
167
finished_at : Optional [str ] = None ,
168
+ from_ : int = 0 ,
169
+ size : int = 100 ,
168
170
) -> List [WorkflowSearchResult ]:
169
171
"""
170
- Find workflows by status and optional time filters on startedAt and/or finishedAt.
172
+ Find workflows based on their status and interval
171
173
172
174
:param status: list of the workflow statuses to filter
173
175
:param started_at: (optional) lower bound on 'status.startedAt' (e.g 'now-2h')
174
176
:param finished_at: (optional) lower bound on 'status.finishedAt' (e.g 'now-1h')
177
+ :param from_:(optional) starting index of the search results (default: `0`).
178
+ :param size: (optional) maximum number of search results to return (default: `100`).
175
179
:returns: list of workflows matching the filters
176
180
:raises ValidationError: if inputs are invalid
177
181
:raises AtlanError: on any API communication issue
178
182
"""
179
183
time_filters = []
180
-
181
184
if started_at :
182
185
time_filters .append (Range (field = "status.startedAt" , gte = started_at ))
183
186
if finished_at :
@@ -199,9 +202,9 @@ def find_runs_by_status_and_time_range(
199
202
),
200
203
],
201
204
)
202
-
203
- run_lookup_results = self . _find_runs ( run_lookup_query )
204
-
205
+ run_lookup_results = self . _find_runs (
206
+ query = run_lookup_query , from_ = from_ , size = size
207
+ )
205
208
return run_lookup_results .hits and run_lookup_results .hits .hits or []
206
209
207
210
@validate_arguments
0 commit comments