&quot;accessing a global variable&quot;<p>Um. What? Why do you have global variables for your celery tasks? They should be idempotent and small.<p>Also, even your http requests should be globally stateless as that is the nature of http.