Issue 17: rake substruct:maintain fails at session cleanup
Status:  Fixed
Owner: ----
Closed:  Apr 2008
Reported by cmauj...@gmail.com, Feb 19, 2008
What steps will reproduce the problem?
1. rake substruct:maintain


What is the expected output? What do you see instead?
expected to run to completion, actual output: 

Updating country order counts...
Updating product costs...
Removing crusty sessions...
rake aborted!
uninitialized constant SESSION_TIMEOUT


What version of the product are you using? On what operating system?
Substruct 1.0.a2 on CentOS5 with mongrel_cluster, lighttpd proxy balancing
and mysql.

Please provide any additional information below.

I'll attach a patch in the next couple days if this isn't fixed or claimed
before then.

 
Feb 19, 2008
#1 cmauj...@gmail.com
I should mention, this happens with ENV=production and ENV=development
Feb 29, 2008
#2 cmauj...@gmail.com
still working on this issue, it looks like the rake task doesn't know about the
Session model. There is nowhere else I can see SESSION_TIMEOUT being used. I think
maybe it should just be kept in the substruct rake tasks. Patch for doing it that way
attached. 
maintain.patch
881 bytes   View   Download
Feb 29, 2008
#3 edmundo...@gmail.com
I would not say that what you have done is wrong, but you don't need to do that, the
constant is just being accessed out of scope, just put a Session:: in front of it and
it will work.

Anyway follows a patch.
session_cleanup.patch
705 bytes   View   Download
Feb 29, 2008
#4 cmauj...@gmail.com
I went there first, and attempted that, but it seemed to me that the "Session" that
rake was getting and the "Session" that had SESSION_TIMEOUT defined were 2 different
things. Given that SESSION_TIMEOUT was being used _only_ for the rake task, I felt it
best just to move it there. 
Apr 9, 2008
Project Member #5 subim...@gmail.com
Edmundo's approach is the one I'd take personally.

This was fixed in trunk earlier tonight. I forget the exact revision #.
Status: Fixed