Skip to content

Commit b4324bc

Browse files
authored
example: switch the postgres source example to use change notification (#956)
1 parent af7e518 commit b4324bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/postgres_source/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def postgres_product_indexing_flow(
6363
),
6464
# Optional.
6565
ordinal_column="modified_time",
66+
notification=cocoindex.sources.PostgresNotification(),
6667
),
67-
refresh_interval=datetime.timedelta(seconds=30),
6868
)
6969

7070
indexed_product = data_scope.add_collector()

examples/postgres_source/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
description = "Demonstrate how to use Postgres tables as the source for CocoIndex."
55
requires-python = ">=3.11"
66
dependencies = [
7-
"cocoindex[embeddings]>=0.2.1",
7+
"cocoindex[embeddings]>=0.2.3",
88
"python-dotenv>=1.0.1",
99
"pgvector>=0.4.1",
1010
"psycopg[binary,pool]",

0 commit comments

Comments
 (0)