Changeset 965 for trunk/Monitoring/smon/repo_io.py
- Timestamp:
- 11/07/13 14:49:45 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Monitoring/smon/repo_io.py
r937 r965 19 19 import datetime 20 20 21 # line below is to include Prodiguer database I/O library in the search path 22 sys.path.append("/opt/supervisor/prodiguer_lib/src") 23 24 25 import types 21 22 26 23 27 24 … … 33 30 34 31 35 36 37 32 g__remote_database_host="ib-pp-db-dev.ipslnet" 33 g__remote_database_port="5432" 34 g__remote_database_name="pdgr_1_0b5" 38 35 39 36 … … 41 38 42 39 # set mode 43 #mode=CSTE_MODE_REMOTE_REPO44 mode=CSTE_MODE_LOCAL_REPO40 mode=CSTE_MODE_REMOTE_REPO 41 #mode=CSTE_MODE_LOCAL_REPO 45 42 46 43 # mode specific init. (e.g. repository driver) … … 50 47 elif mode==CSTE_MODE_REMOTE_REPO: 51 48 49 # line below is to include Prodiguer database I/O library in the search path 50 sys.path.append("/opt/supervisor/prodiguer_lib/src") 51 52 import types 53 52 54 # import Prodiguer database I/O library 53 55 import prodiguer_shared.mq.hooks as repo 54 55 56 # HACK57 # (uncomment those two lines if use prodiguer repo)58 56 import prodiguer_shared.repo.session as repo_session 59 57 import prodiguer_shared.models as models … … 94 92 repo.connect() 95 93 elif mode==CSTE_MODE_REMOTE_REPO: 96 _CONNECTION = "postgresql://postgres:Silence107!@ ib-pp-db-dev.ipslnet:5432/pdgr_1_0b5"94 _CONNECTION = "postgresql://postgres:Silence107!@%s:%s/%s"%(g__remote_database_host,g__remote_database_port,g__remote_database_name) 97 95 repo_session.start(_CONNECTION) 98 96 … … 245 243 simulation=repo.retrieve_simulation(name) 246 244 except: 247 traceback.print_exc()245 raise 248 246 249 247 elif mode==CSTE_MODE_REMOTE_REPO: … … 356 354 repo.update_simulation_status(simulation) 357 355 except: 358 traceback.print_exc()356 raise 359 357 360 358 elif mode==CSTE_MODE_REMOTE_REPO:
Note: See TracChangeset
for help on using the changeset viewer.