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

Equivalent of "SELF" within the task in Celery-Node Workers #55

Open
danielmichalichyn opened this issue May 3, 2021 · 0 comments
Open

Comments

@danielmichalichyn
Copy link
Contributor

Hello @actumn, how are you?

Description

In Celery for python, when we define a task, within this task we can call a self argument to obtain some informations about the current running task, such as ID, Group, parentId, ETA... I was wondering how we can achieve the same result in the Celery-node worker.

Suggestion

Right now we pass some arguments to a task, like, args, kwargs and some to be implemented, that is the embed, that i've imagine is to make custom Kombu consumers. In the same way we cannot create some "self" object that contain all the header information and send to the task handler as well? So if the task have defined "args, kwargs and self", with this object we can obtain the information described above.

I'm willing to create a PR if we agree on the correct way to achieve this result.

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