Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: restart a worker manually or follow some condition #1958

Open
boltomli opened this issue Dec 3, 2024 · 0 comments
Open

Feature: restart a worker manually or follow some condition #1958

boltomli opened this issue Dec 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@boltomli
Copy link

boltomli commented Dec 3, 2024

To suggest an idea or inquire about a new Message Broker supporting feature or any other enhancement, please follow this template:

Is your feature request related to a problem? Please describe.
I'm not sure if it's problem related. Maybe it's already there, but not described as I see in docs.

Describe the solution you'd like
To test some tasks, I'd like to restart each worker once it finishes processing.

Feature code example

from faststream.nats.fastapi import NatsRouter

router = NatsRouter("nats://nats-service")

@router.subscriber("subject", "queue", max_msgs=1)
async def worker():
  # auto restart after max_msgs reach 1
  # or manually restart
  if True:
    restart()
...

Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've thought about.

Additional context
Include any other relevant context or screenshots related to the feature request.

@boltomli boltomli added the enhancement New feature or request label Dec 3, 2024
@Lancetnik Lancetnik moved this to Backlog in FastStream Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant