Blame view

src/majordome/start_agent_majordome.py 581 Bytes
03814884   Etienne Pallier   launch majordome ...
1
#!/usr/bin/env python
b4e8963c   Etienne Pallier   Each agent (envmo...
2
3
4
5
6
7
8

import os
import sys

# DJANGO setup
#sys.path.append('/PROJECTS/GFT/SOFT/PYROS_SOFT/PYROS201802')
sys.path.append('..')
03814884   Etienne Pallier   launch majordome ...
9
10
11
#print("file is", __file__)
mypath = os.getcwd()

b4e8963c   Etienne Pallier   Each agent (envmo...
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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()