[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r7085 - trunk/gnue-appserver/src
From: |
johannes |
Subject: |
[gnue] r7085 - trunk/gnue-appserver/src |
Date: |
Thu, 3 Mar 2005 05:08:01 -0600 (CST) |
Author: johannes
Date: 2005-03-03 05:08:01 -0600 (Thu, 03 Mar 2005)
New Revision: 7085
Modified:
trunk/gnue-appserver/src/geasRpcServer.py
trunk/gnue-appserver/src/geasSessionManager.py
Log:
Scan and import modulepath only through geasRpcServer
Modified: trunk/gnue-appserver/src/geasRpcServer.py
===================================================================
--- trunk/gnue-appserver/src/geasRpcServer.py 2005-03-03 11:05:26 UTC (rev
7084)
+++ trunk/gnue-appserver/src/geasRpcServer.py 2005-03-03 11:08:01 UTC (rev
7085)
@@ -255,7 +255,7 @@
self.OPTIONS ["password"])
self.connections.setLoginHandler (loginhandler)
self.sm = geasSessionManager.geasSessionManager (self.connections,
- gConfig ('modulepath'))
+ gConfig ('modulepath'), True)
return self.sm
@@ -269,7 +269,7 @@
"""
if self.sm:
- self.sm.updateRepository ()
+ self.sm.updateRepository (scanModules = True)
# ---------------------------------------------------------------------------
# Check the current state of the garbage collection
Modified: trunk/gnue-appserver/src/geasSessionManager.py
===================================================================
--- trunk/gnue-appserver/src/geasSessionManager.py 2005-03-03 11:05:26 UTC
(rev 7084)
+++ trunk/gnue-appserver/src/geasSessionManager.py 2005-03-03 11:08:01 UTC
(rev 7085)
@@ -56,7 +56,7 @@
# Initalize
# ---------------------------------------------------------------------------
- def __init__ (self, connections, modulepath = None):
+ def __init__ (self, connections, modulepath = None, scanModules = False):
self._connections = connections
self._sessions = {}
self._buildInternalSession ()
@@ -68,7 +68,7 @@
#prof.runctx ('self.updateRepository (haltOnError = True)', globals (),
#locals ())
#prof.dump_stats ('appserver.profile')
- self.updateRepository (haltOnError = True)
+ self.updateRepository (scanModules, haltOnError = True)
cfg = gConfigDict (section = 'appserver')
dbauth = cfg.get ('authentication', 'False')
@@ -113,13 +113,17 @@
# Update the class repository
# ---------------------------------------------------------------------------
- def updateRepository (self, haltOnError = False):
+ def updateRepository (self, scanModules, haltOnError = False):
"""
This function updates the class repository used by the session manager.
First the modulepath will be scanned for gcd- and gld-files. All files
found will be integrated and finally the repository get's updated.
"""
+ if not scanModules:
+ self._loadRepository ()
+ return
+
try:
(gcd, gld) = self._scanModulePath ()
@@ -150,17 +154,29 @@
print o(msg)
else:
- print o(u_("Reloading class repository ..."))
+ self._loadRepository ()
- self._internalSession.rollback ()
- classrep.init (self)
+ # ---------------------------------------------------------------------------
+ # Load the class repository
+ # ---------------------------------------------------------------------------
- self._filter = geasFilter.geasFilter (self)
+ def _loadRepository (self):
+ """
+ This function loads the class repository
+ """
- print o(u_("Class repository loaded"))
+ print o(u_("Reloading class repository ..."))
+ self._internalSession.rollback ()
+ classrep.init (self)
+
+ self._filter = geasFilter.geasFilter (self)
+
+ print o(u_("Class repository loaded"))
+
+
# ---------------------------------------------------------------------------
# Scan the module path for all GCD- and GLD-files
# ---------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r7085 - trunk/gnue-appserver/src,
johannes <=