Open donc310 opened 4 months ago
You're completely right. If you want to become a contributor, you can create a PR that fixes it. I haven't experienced this problem yet, but I think it's a possible bug.
Thanks for noticing. If you don't want to create a PR, I can create a patch myself.
Will make PR for the fix.
Hello and thank you very much for your work on this project.
I currently have an issue where tasks submitted with custom labels mutates the underlying decorated task instance
For some context on what we were trying to achieve;
We were building a custom Sentry Integration for TaskIq that would add tracing meta-data as labels to queued messages, to achieve this we patched
AsyncKicker.kiq
andReceiver.run_task
methods to add tracing info to message labels which would track tasks from when there were submitted to when a worker picks up and processes the message.The above test case fails because after the second task is submitted all other subsequent tasks will have a trcae_id of
22222
.Our current workaround is to use a custom task class which doesn't mutate the original task labels