Hi! I have successfully followed the topics to launch simple tasks and tasks with virtualenvs.
However, launching a task with virtualenv and variables fails...
source virtualenvwrapper.sh && workon env_td_mine && python3.5 /home/my_username/dev/td_mine/mine_production/reusableminer/launch/hello_dropbox_task.py
Error:
Traceback...
(desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DROPBOX_TOKEN, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
The script uses Dropbox token as a variable.
When I use workon env_td_mine
and then python manage.py shell
to play with script in bash with virtualenv loaded, everything is OK.
Seems like I can't properly launch task with virtualenv variables. How to do it correctly?