Running Celery as root
1st solution - Manually type command at terminal
$ export C_FORCE_ROOT='true'
2nd solution - Edit shell configuration
$ vi ~/.bashrc # add following line export C_FORCE_ROOT='true'$ source ~/.bashrc
3rd solution - Edit manage.py
of Django
import os if __name__ == '__main__': os.environ.setdefault('C_FORCE_ROOT', 'true') os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{PATH TO SETTINGS FILE}') execute_from_command_line(sys.argv)
Anywhere so the python process picks it up by using os.environ
.
If your question is about how the environment variables work, please read this tutorial.