- Timestamp:
- 10/10/12 13:41:45 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/cedaMoles/MolesManager/molesSessionMiddleware.py
r8536 r8624 43 43 from django.shortcuts import render_to_response 44 44 from cedaMoles import __version__, __revision__ 45 from logging import StreamHandler 46 import logging 47 48 log = logging.getLogger('MolesSessionMiddleware') 49 log.addHandler(StreamHandler()) 50 log.setLevel(logging.INFO) 45 51 46 52 def assemble_version(): … … 64 70 65 71 def _doInitialization(self): 66 67 infoDB = DbManager(INFO_DB_CONNECTION) 68 MolesSessionMiddleware._infodbEPBFactory = InfodbEPBFactory(infoDB) 72 start_migration = False 73 try: 74 infoDB = DbManager(INFO_DB_CONNECTION) 75 MolesSessionMiddleware._infodbEPBFactory = InfodbEPBFactory(infoDB) 76 start_migration = True 77 except Exception: 78 log.info("Cannot initialize infoDB. The migration process will not start \ 79 however the application will continue to browse the existing database.") 69 80 70 81 migrationDB = DbManager(MIGRATION_DB_CONNECTION, MIGRATION_DB_SCRIPT) … … 74 85 MolesSessionMiddleware._moles3EPBFactory = Moles3EPBFactory(molesDB) 75 86 87 MolesSessionMiddleware._epbInitialized = True 88 89 if not start_migration: 90 return 91 76 92 MolesSessionMiddleware._migrationThread = MigrationThread( \ 77 93 MolesSessionMiddleware._moles3EPBFactory.createEPB(), \ … … 79 95 MolesSessionMiddleware._infodbEPBFactory.createEPB(), \ 80 96 interval = MIGRATION_INTERVAL ) 81 MolesSessionMiddleware._epbInitialized = True97 82 98 83 99 _migration()
Note: See TracChangeset
for help on using the changeset viewer.