You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a need to use headers to carry some context; however, when I tested it in eager mode and in real environment, it behaves differently. In eager mode, the headers are stored in request.headers but in real environment it stored under requests as attributes.
I'm currently handling two different cases to pass test and get it worked in real environment. However, it seems a bit odd for me. Not sure which behavior is expected in celery's original design.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a need to use headers to carry some context; however, when I tested it in eager mode and in real environment, it behaves differently. In eager mode, the headers are stored in request.headers but in real environment it stored under requests as attributes.
I'm currently handling two different cases to pass test and get it worked in real environment. However, it seems a bit odd for me. Not sure which behavior is expected in celery's original design.
Sample code:
Result:
Full Reproduce Steps: https://github.com/pkyosx/celery_headers_issue
Beta Was this translation helpful? Give feedback.
All reactions