I have tried to add following content in celery beat "before_task_publish" signal as below in my task.py file
@before_task_publish.connect
def task_before_publish_handler(*args, **kwargs):
my_data={"foo":"bar"}
kwargs['request'][1]['my_data']=my_dat
return kwargs
Now in the worker end of task.py I tried to intercept the message using signal "task_received", as below,
@task_received.connect
def task_receive_handler(*args, **kwargs):
print(kwargs['request'])
Here in the receiver end signals I get the message in kwargs['request'] but not my appended value my_data. May be how I intercept in the celery beat signal is not proper