From 7c7b2ce9426e80d8da81d09c15d949d44e6e0075 Mon Sep 17 00:00:00 2001 From: Majajashka <96516033+Majajashka@users.noreply.github.com> Date: Sun, 1 Dec 2024 22:11:46 +0400 Subject: [PATCH 1/2] docs: use DeliverPolicy Enum for deliver_policy in subscriber Updated deliver_policy to use DeliverPolicy enum according to type definition --- docs/docs_src/nats/js/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs_src/nats/js/main.py b/docs/docs_src/nats/js/main.py index a65749b082..715e04fd4b 100644 --- a/docs/docs_src/nats/js/main.py +++ b/docs/docs_src/nats/js/main.py @@ -1,5 +1,6 @@ from faststream import FastStream, Logger from faststream.nats import JStream, NatsBroker +from nats.js.api import DeliverPolicy broker = NatsBroker() app = FastStream(broker) @@ -9,7 +10,7 @@ @broker.subscriber( "js-subject", stream=stream, - deliver_policy="new", + deliver_policy=DeliverPolicy.NEW, ) async def handler(msg: str, logger: Logger): logger.info(msg) From dc9638d9e23e909bbf73af95ae11f07e3a82c841 Mon Sep 17 00:00:00 2001 From: Majajashka Date: Sun, 1 Dec 2024 18:20:18 +0000 Subject: [PATCH 2/2] docs: generate API References --- .secrets.baseline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 047a7df974..f396e694ed 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -153,7 +153,7 @@ "filename": "docs/docs/en/release.md", "hashed_secret": "35675e68f4b5af7b995d9205ad0fc43842f16450", "is_verified": false, - "line_number": 1850, + "line_number": 1898, "is_secret": false } ], @@ -178,5 +178,5 @@ } ] }, - "generated_at": "2024-11-15T07:38:53Z" + "generated_at": "2024-12-01T18:17:03Z" }