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: high-loaded tasks #14

Open
exactstat opened this issue Sep 6, 2023 · 0 comments
Open

Question: high-loaded tasks #14

exactstat opened this issue Sep 6, 2023 · 0 comments

Comments

@exactstat
Copy link

I can see that the same file is used on the API side and by the worker - it's the 'worker.py' file. As I understand it, the @celery.task decorator provides the creation of a message in the queue, but the function (task) itself is performed on another service, by the worker, after processing the message with arguments.
In my case, the function is extremely resource-consuming (it's a neural network). Can I leave the function on the API side with only arguments (for example, add NotImplementedError to it), and on the worker side I will make its full implementation?
To make the question more generalized: can I use only the interface on the API side, and make a full implementation on the worker side?

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