Skip to content

Conversation

@sheldygg
Copy link
Collaborator

@sheldygg sheldygg commented Nov 2, 2025

Description

This PR provide api for scheduling messages via Nats JetStream

  • New feature (a non-breaking change that adds functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (just lint shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running just test-coverage
  • I have ensured that static analysis tests are passing by running just static-analysis
  • I have included code examples to illustrate the modifications

@sheldygg sheldygg requested a review from Lancetnik as a code owner November 2, 2025 21:02
@CLAassistant
Copy link

CLAassistant commented Nov 2, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file NATS Issues related to `faststream.nats` module and NATS broker features labels Nov 2, 2025
Copy link
Member

@Lancetnik Lancetnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a little documentation section about new section?


__slots__ = ("target", "time")

def __init__(self, time: datetime | str, target: str, /) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add docstring here

from faststream._internal.proto import NameRequired


class Schedule(NameRequired):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't inherit this class here. You can make a regular dataclass

assert await response.decode() == "Hi!", response

@pytest.mark.asyncio()
async def test_publish_with_schedule(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, move this test out of class to regular test function


assert await response.decode() == "Hi!", response

@pytest.mark.asyncio()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we need to add connected and nats markers here

@Lancetnik Lancetnik marked this pull request as draft November 6, 2025 17:04
@sheldygg sheldygg marked this pull request as ready for review November 7, 2025 00:56
@sheldygg sheldygg requested a review from kumaranvpl as a code owner November 7, 2025 01:08
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Nov 7, 2025
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Nov 8, 2025
@Lancetnik Lancetnik enabled auto-merge November 11, 2025 08:51
@Lancetnik Lancetnik mentioned this pull request Nov 11, 2025
4 tasks
@Lancetnik Lancetnik added this pull request to the merge queue Nov 11, 2025
Merged via the queue into ag2ai:main with commit a3883e0 Nov 11, 2025
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code NATS Issues related to `faststream.nats` module and NATS broker features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants