Skip to content

Commit

Permalink
make a stale index boolean flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Jan 16, 2024
1 parent 173ab3c commit 5f72de8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions yente/data/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class DataCatalogModel(BaseModel):
datasets: List[DatasetModel]
current: List[str]
outdated: List[str]
index_stale: bool = False


class Algorithm(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions yente/routers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ async def catalog() -> DataCatalogModel:
response["current"].append(dataset.name)
elif dataset.index_version is not None:
response["outdated"].append(dataset.name)
response["index_stale"] = len(response["outdated"]) > 0
return DataCatalogModel.model_validate(response)


Expand Down

0 comments on commit 5f72de8

Please sign in to comment.