diff --git a/openlibrary/solr/update.py b/openlibrary/solr/update.py index c1f20c87604..710da85f184 100644 --- a/openlibrary/solr/update.py +++ b/openlibrary/solr/update.py @@ -155,7 +155,7 @@ def load_configs( async def main( keys: list[str], - osp_dump: Path, + osp_dump: Path | None = None, ol_url="http://openlibrary.org", ol_config="openlibrary.yml", output_file: str | None = None, diff --git a/openlibrary/utils/open_syllabus_project.py b/openlibrary/utils/open_syllabus_project.py index 7a3fd109ef5..0260f536c4d 100644 --- a/openlibrary/utils/open_syllabus_project.py +++ b/openlibrary/utils/open_syllabus_project.py @@ -18,7 +18,7 @@ def get_osp_dump_location() -> Path | None: return osp_dump_location -def set_osp_dump_location(val: Path): +def set_osp_dump_location(val: Path | None): global osp_dump_location osp_dump_location = val diff --git a/scripts/solr_builder/solr_builder/solr_builder.py b/scripts/solr_builder/solr_builder/solr_builder.py index e8f0f8a6f92..0f3c83b12ad 100644 --- a/scripts/solr_builder/solr_builder/solr_builder.py +++ b/scripts/solr_builder/solr_builder/solr_builder.py @@ -378,7 +378,7 @@ def build_job_query( async def main( cmd: Literal['index', 'fetch-end'], job: Literal['works', 'orphans', 'authors', 'lists'], - osp_dump: Path, + osp_dump: Path | None = None, postgres="postgres.ini", ol="http://ol/", ol_config="../../conf/openlibrary.yml", diff --git a/scripts/solr_updater.py b/scripts/solr_updater.py index aef4d6ccc02..abfbfe11634 100644 --- a/scripts/solr_updater.py +++ b/scripts/solr_updater.py @@ -244,7 +244,7 @@ async def update_keys(keys): async def main( ol_config: str, - osp_dump: Path, + osp_dump: Path | None = None, debugger: bool = False, state_file: str = 'solr-update.state', exclude_edits_containing: str | None = None,