Skip to content

Question: high-loaded tasks #14

Open
@exactstat

Description

@exactstat

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions