diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1d723a0..3dbab51 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,11 +3,11 @@ name: Build Image on: push: tags: - - '[0-9]+.[0-9]+.[0-9]+\-rc[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+\-b[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+b[0-9]+' - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+\-rc[0-9]+' - - '[0-9]+.[0-9]+\-b[0-9]+' + - '[0-9]+.[0-9]+rc[0-9]+' + - '[0-9]+.[0-9]+b[0-9]+' - '[0-9]+.[0-9]+' jobs: diff --git a/i3worker/cli/app.py b/i3worker/cli/app.py index d700744..074380f 100644 --- a/i3worker/cli/app.py +++ b/i3worker/cli/app.py @@ -1,3 +1,4 @@ +import logging import uuid from typing import Optional import typer @@ -16,7 +17,7 @@ engine = create_engine(settings.papermerge__search__url) schema_manager = SchemaManager(engine, model=IndexEntity) - +logger = logging.getLogger(__name__) index = IndexRW(engine, schema=IndexEntity) NodeIDsType = Annotated[ @@ -38,8 +39,9 @@ def index_cmd( start indexing the rest of the documents `--dry-run` """ - + logger.debug("index cmd") with Session() as db_session: + logger.debug("getting nodes") nodes = api.get_nodes(db_session, node_ids) items = [] # to be added to the index for node in nodes: @@ -79,8 +81,9 @@ def index_cmd( if rebuild: # drop all documents from the index index.remove(query="*:*") - + logger.debug("adding items") for item in items: + logger.debug(f"adding item {item}") index.add(item) diff --git a/poetry.lock b/poetry.lock index 6e903e4..d1cbd66 100644 --- a/poetry.lock +++ b/poetry.lock @@ -125,13 +125,13 @@ zstd = ["zstandard (==0.22.0)"] [[package]] name = "certifi" -version = "2024.8.30" +version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, - {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, + {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, + {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] [[package]] @@ -805,13 +805,13 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] name = "pydantic-settings" -version = "2.6.1" +version = "2.7.0" description = "Settings management using Pydantic" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_settings-2.6.1-py3-none-any.whl", hash = "sha256:7fb0637c786a558d3103436278a7c4f1cfd29ba8973238a50c5bb9a55387da87"}, - {file = "pydantic_settings-2.6.1.tar.gz", hash = "sha256:e0f92546d8a9923cb8941689abf85d6601a8c19a23e97a34b2964a2e3f813ca0"}, + {file = "pydantic_settings-2.7.0-py3-none-any.whl", hash = "sha256:e00c05d5fa6cbbb227c84bd7487c5c1065084119b750df7c8c1a554aed236eb5"}, + {file = "pydantic_settings-2.7.0.tar.gz", hash = "sha256:ac4bfd4a36831a48dbf8b2d9325425b549a0a6f18cea118436d728eb4f1c4d66"}, ] [package.dependencies] diff --git a/pyproject.toml b/pyproject.toml index 65764db..b58745b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "i3worker" -version = "0.3.0" +version = "0.3.1b1" description = "Sync DB with search index" authors = ["Eugen Ciur "] readme = "README.md"