Blame view

src/monitoring/start_agent_monitoring.py 588 Bytes
b4e8963c   Etienne Pallier   Each agent (envmo...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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
20ed1e7a   Etienne Pallier   bugfixed time sav...
16

b4e8963c   Etienne Pallier   Each agent (envmo...
17
18
django.setup()

20ed1e7a   Etienne Pallier   bugfixed time sav...
19
20
21
#import datetime
#print(datetime.datetime.now())

b4e8963c   Etienne Pallier   Each agent (envmo...
22
23
24
25
26
27
# MONITORING AGENT setup
agent="monitoring"

if agent=="monitoring":
    from monitoring.tasks import Monitoring
    Monitoring().run()