Русский
Открыть в Telegram
FFastStream

FastStream

@python_faststream · группа · Технологии · в индексе с 2026-05-29
729участников
36пишущих за 30 дней
942сообщений за 30 дней
79 428сообщений в индексе
  1. A
    Ты обрабатываешь жизненный цикл через вебфреймворк (lifespan). При том что речь уже идет о фоновом воркере подписанным на брокера.
    1. Б
      У тебя асинк контекст токо в лайфспане
Вся ветка · 2 ответа →
Б
Ну я снял. Но в целом конечно библиотека особо не нужна, просто стартани брокер в лайфспане
Вся ветка · 1 ответ →
  1. A
    так там и дишка получается не нужен
Вся ветка · 3 ответа →
A
async def main() -> None: app = await create_app() server = uvicorn.Server( uvicorn.Config(app, host="0.0.0.0", port=8000) ) await server.serve() if __name__ == "__main__": asyncio.run(main())
A
Так сделай тогда будет работать
A
Причина в жизненном цикле: провайдер открывает брокер, но asyncio.run(create_app()) закрывает свой event loop до запуска Uvicorn. При закрытии loop соединение брокера закрывается. Обработчик получает этот же брокер и вызывает publish() уже без соединения. То есть дело не в самом размещении брокера в провайдере, а в том, что его открывают при создании приложения в отдельном asyncio.run()
  1. A
    ты о чем? Мой пример или что?
    1. 1
      ага, вообще редко вижу запуск не через cli и тем более через такую обёртку
      1. A
        хз, когда смотрю проекты постоянных участников сообщества, то там как правило наоборот все ручками делают включая запуск сервера.
Вся ветка · 3 ответа →
1
обычно всегда фабрику прикидываю, что в ФС, что в других случаях
G
🎉 New Pull Request to ag2ai/faststream by @benedikt-bartscher ✨ fix(rabbit): cancel the consumer before waiting for in-flight handlers on stop (#3298) 📊 +101/-7 🌿 benedikt-bartscher:fix/rabbit-cancel-consumer-before-graceful-wait → main DESCRIPTION RabbitSubscriber.stop() cancelled the consumer only after graceful_timeout, so RabbitMQ kept delivering up to the prefetch count to the stopping subscriber, which ignored those messages and left them unacknowledged until the channel closed; it now cancels the consumer before waiting for in-flight handlers and requeues anything that still arrives meanwhile, so these messages go to the queue's other consumers right away, as the graceful shutdown docs describe ("Every subscriber stops consuming new messages"). Type of change ☑️ Bug fix (a non-breaking change that resolves an issue) 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 ☑️ 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 sent via relator
G
🎉 New Pull Request to ag2ai/faststream by @vlbaluk ✨ docs: add Wordfully to adopters (#3299) 📊 +1/-0 🌿 vlbaluk:docs/add-wordfully-batch-2 → main DESCRIPTION Adds Wordfully to the organization-confirmed adopter table. Optional deployment fields are left empty. No related issue. Type of change ☑️ Documentation Validation Checked the six-column table, company link, duplicate absence, and changed-file scope. Application tests and static analysis were not run for this listing-only change. Checklist ☑️ I have conducted a self-review of the change ☑️ I have made the necessary changes to the documentation ◻️ just lint, just test-coverage, and just static-analysis were not run for this adopter-list edit Tests and code examples: not applicable; no behavior changed sent via relator
G
🎉 New Pull Request to faststream-community/dishka-faststream by @dependabot[bot] ✨ chore(deps): bump the github-actions group across 1 directory with 6 updates (#64) 📊 +9/-9 🌿 faststream-community:dependabot/github_actions/github-actions-0236d778bf → main #dependencies #github_actions sent via relator

Открытая публичная лента из поискового индекса ChatCrawler — «Google по публичному Telegram»; обновляется по мере обхода площадки. Время — UTC.

Только публичный контент, официальный API Telegram. О проекте · Вопросы · Границы индекса · Убрать страницу из выдачи · Каталог · Поиск · Как мы считаем