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

Start "full" faust worker inside fast-api #2

Open
ndrfrr opened this issue Jan 19, 2022 · 0 comments
Open

Start "full" faust worker inside fast-api #2

ndrfrr opened this issue Jan 19, 2022 · 0 comments

Comments

@ndrfrr
Copy link

ndrfrr commented Jan 19, 2022

Hi, I see that in this example only a faust worker in client mode is started in the fast-api app.
Would it be possible to have a full faust worker running inside the fast-api app?

I tried changing your code by doing:
asyncio.create_task(faust_app.main()) instead of asyncio.create_task(faust_app.start_client()) in api.py.
Doing that I get an error related to the event loop: RuntimeError: this event loop is already running.

Digged online but wasn't able to find much. Have you met this usecase before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant