start_agent_majordome.py
532 Bytes
#!/usr/bin/env python3
import os
import sys
# DJANGO setup
#sys.path.append('/PROJECTS/GFT/SOFT/PYROS_SOFT/PYROS201802')
sys.path.append('..')
# Go into src/
os.chdir('..')
#print("Current directory : " + str(os.getcwd()))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.pyros.settings")
#os.environ['SECRET_KEY'] = 'abc'
#os.environ['ENVIRONMENT'] = 'production'
import django
django.setup()
# MONITORING AGENT setup
agent="majordome"
if agent=="majordome":
from majordome.tasks import Majordome
Majordome().run()