Commit 82400cb80b97e70c11f8acdf6cc6d842c29cbd7f
1 parent
1fb6bca0
Exists in
dev
simplification import Agent dans A_Scheduler
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
src/core/pyros_django/majordome/agent/A_Basic.py
... | ... | @@ -14,13 +14,17 @@ import os |
14 | 14 | |
15 | 15 | ###sys.path.append("../../../..") |
16 | 16 | |
17 | +# pwd = PYROS/ | |
17 | 18 | pwd = os.environ['PROJECT_ROOT_PATH'] |
18 | 19 | if pwd not in sys.path: |
19 | 20 | sys.path.append(pwd) |
20 | 21 | |
22 | +# Add paths PYROS/src and PYROS/src/core/pyros_django | |
21 | 23 | short_paths = ['src', 'src/core/pyros_django'] |
22 | 24 | for short_path in short_paths: |
23 | 25 | path = os.path.join(pwd, short_path) |
26 | + # ou plutot ? | |
27 | + #path = os.path.abspath(os.path.join(pwd, short_path)) | |
24 | 28 | if path not in sys.path: |
25 | 29 | sys.path.insert(0, path) |
26 | 30 | ... | ... |
src/core/pyros_django/scheduling/A_Scheduler.py
... | ... | @@ -29,6 +29,7 @@ import argparse |
29 | 29 | import os |
30 | 30 | import pickle |
31 | 31 | import socket |
32 | + | |
32 | 33 | pwd = os.environ['PROJECT_ROOT_PATH'] |
33 | 34 | if pwd not in sys.path: |
34 | 35 | sys.path.append(pwd) |
... | ... | @@ -39,7 +40,8 @@ for short_path in short_paths: |
39 | 40 | if path not in sys.path: |
40 | 41 | sys.path.insert(0, path) |
41 | 42 | |
42 | -from src.core.pyros_django.majordome.agent.Agent import Agent, build_agent, log, parse_args | |
43 | +#from src.core.pyros_django.majordome.agent.Agent import Agent, build_agent, log, parse_args | |
44 | +from majordome.agent.Agent import Agent, build_agent, log, parse_args | |
43 | 45 | from seq_submit.models import Sequence |
44 | 46 | from user_mgmt.models import Period, ScientificProgram, SP_Period |
45 | 47 | from scheduling.models import PredictiveSchedule, EffectiveSchedule | ... | ... |