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

Question regarding workers #1

Open
avico78 opened this issue May 11, 2021 · 1 comment
Open

Question regarding workers #1

avico78 opened this issue May 11, 2021 · 1 comment

Comments

@avico78
Copy link

avico78 commented May 11, 2021

@jitendrasinghiitg
Thanks for sharing this implantation ,

can u please explain whats the purpose of worker.py inside celery folder?
for the worker.py inside the app which being calling via fastapi - i understand ,
we want to call the app but not sure why worker.py needed inside the celery folder .
if u have more example of fastapi with celery - it would be really awesome to see.

thanks!

@chickooooo
Copy link
Contributor

Hello @avico78.

In a production setup, you would have your app folder (REST API's) on a seperate server and your celery folder (celery workers) on another server.
That's why @jitendrasinghiitg has used 2 seperate worker.py files here.

If you are deploying both of your applications (API's & Workers) on the same server, then you can use a single worker.py file and share it between your applications.

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

2 participants