I've looked at questions like this one and a dozen others. But none of them seems to be working.
I've a shared_task like this one, which doesn't return anything:
@shared_task
def rename_widget(widget_id, name):
w = Widget.objects.get(id=widget_id)
w.name = name
w.save()
I've tried self.request.id
and current_task.request.id
but they both returned None.
My celery version is 5.0.4 and django version is 3.1.1. I'm using Rabbitmq as messenger.