[Grok-dev] Data.fs grow as result of create and remove principal
Jens Adner
j.adner at fh-sm.de
Wed Mar 11 05:55:15 EDT 2009
Hi there,
my app is on a good way, all fine, ldap-auth is working and I am happy
with grok.
There is one small problem left I have. But it's not a real problem.
The problem is, Data.fs is growing every time a principal is greating or
removing by logging in or out.
This is my code:
app.py
---------------------------------------------------------------------
class Foo(grok.Application, GlobalContainer):
grok.local_utility(ldapauth.LdapAuth,
provides=IAuthenticatorPlugin,name='ldapauth2')
grok.local_utility(ldapauth.MyCreds,
provides=ICredentialsPlugin,name='loginform2')
grok.local_utility(ldapauth.MyPau,provides=IAuthentication)
---------------------------------------------------------------------
and
ldapauth.py
---------------------------------------------------------------------
...
from zope.app.authentication.session import SessionCredentialsPlugin
class LdapAuth(ldappas.authentication.LDAPAuthentication):
def __init__(self):
self.adapterName = 'fhsLdapAdapter'
self.searchBase = 'dc=fh-sm,dc=de'
...
class MyCreds(SessionCredentialsPlugin):
pass
class MyPau(authentication.PluggableAuthentication):
def __init__(self):
super(MyPau,self).__init__()
self.credentialsPlugins = ('loginform2',)
self.authenticatorPlugins = ('ldapauth2',)
self.prefix = u'pau2.'
----------------------------------------------------------------------
and in addition I create roles and perms:
-----------------------------------------------------
...
@grok.subscribe(IPrincipalCreated)
def update_principal_info_from_ldap(event):
principal = event.principal
app = grok.getSite()
....
-----------------------------------------------------
Data.fs is growing after login and logout about 500 Byte or so.
I can pack the Data.fs with self.request.publication.db.pack(), but this
is not the best way.
My Question is, why Data.fs grow? I don't create Data in my app. I think
this is a session problem, maybe the session will create in Data.fs, not
in RAM.
Thx for your help
Jens
--
++++++++ Jens Adner IuK-Zentrum Fachhochschule Schmalkalden +++++++++
++++++++ Fon: +49 3683688 9201 Fax: +49 3683688 989201 +++++++++
More information about the Grok-dev
mailing list