On Jun 24, 2010, at 8:51 AM, dave wrote:

>  File "/Users/dave/om/trunk/OpenMile/openmile/model/authtoken.py",
> line 122, in forToken
>    meta.Session.add(at)

Where is this bit called from? If its being triggered on some import, *before* 
the engine initialization code in environment.py, then it could cause this 
problem. SQLAlchemy is setup in the environment.py file generally, with the 
init_model call. So the db shouldn't be used until after that call completes.

> We can make this problem go away one of two ways: 1) flush the cache
> (not desirable.) 2) Issue a request to the server that does not invoke
> the caching code. After we issue a single, quick working request,
> subsequent requests work fine everything is happy.
> 
> It seems to me that this is a bug. When I start the server, shouldn't
> Pylons have SQLAlchemy fully set up? What magic is the first request
> doing that is being missed?

None, do you mean that the first request to the server after it starts up does 
not work, but later ones do?

Cheers,
Ben

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to