#2346: Visit expires even though the user had accessed before expiry time
--------------------------------+-------------------------------------------
Reporter: mitsuru.oka | Owner: chrisz
Type: defect | Status: new
Priority: low | Milestone: 1.0.x bugfix
Component: TurboGears | Version: 1.0.8
Severity: normal | Resolution:
Keywords: needs patch, visit |
--------------------------------+-------------------------------------------
Comment (by Chris Arndt):
As the OP already hinted at, `SQLObject|AlchemyVisitManager.visit_for_key`
should check if `visit_key` is in self.queue and, if yes, use the expiry
time from there. E.g.
{{{
visit = visit_class.lookup_visit(visit_key)
if not visit:
return None
now = datetime.now(visit.expiry.tzinfo)
expiry = self.queue.get(visit_key) or visit.expiry
if expiry < now:
return None
}}}
I don't think we need to lock `self.queue` just for reading it though
there might be a minimal chance for a race condition, so we might as well.
--
Ticket URL: <http://trac.turbogears.org/ticket/2346#comment:4>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---