Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster/dagster/core/storage/runs/in_memory.py
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | def get_runs(self, filters=None, cursor=None, limit=None): | ||||
if not filters: | if not filters: | ||||
return self._slice(list(self._runs.values())[::-1], cursor, limit) | return self._slice(list(self._runs.values())[::-1], cursor, limit) | ||||
def run_filter(run): | def run_filter(run): | ||||
if filters.run_ids and run.run_id not in filters.run_ids: | if filters.run_ids and run.run_id not in filters.run_ids: | ||||
return False | return False | ||||
if filters.status and filters.status != run.status: | if filters.statuses and run.status not in filters.statuses: | ||||
return False | return False | ||||
if filters.pipeline_name and filters.pipeline_name != run.pipeline_name: | if filters.pipeline_name and filters.pipeline_name != run.pipeline_name: | ||||
return False | return False | ||||
if filters.tags and not all( | if filters.tags and not all( | ||||
run.tags.get(key) == value for key, value in filters.tags.items() | run.tags.get(key) == value for key, value in filters.tags.items() | ||||
): | ): | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |