Yes, you have it right -- you can do session.forget(response) or 
session._unlock(response) (the former ultimately calls the latter).

Anthony

On Tuesday, December 25, 2012 3:58:00 AM UTC-5, [email protected] wrote:
>
> Hello,
>
> I'm a little confused here... I tried to put your code in the models (I 
> suppose you mean db.py) as you suggest but it didn't work. Then, I put it 
> in the controller for this AJAX method and it didn't work either. After 
> that, I modified your code to unlock the response instead of the request 
> and it worked.
>
> I ended up using session.forget(response) (which seems to be the official 
> documented method) in my AJAX controller and it works. But... am I doing it 
> right?
>
> Merry Christmas,
> Raphael
>
> Le lundi 24 décembre 2012 19:29:36 UTC+1, Massimo Di Pierro a écrit :
>>
>> No this is a "feature" which can be disabled. Web2py serializes all 
>> requests from the same user by locking sessions. You can do in your models:
>>
>> if request.ajax: session._unlock(request)
>>
>> Massimo
>>
>> On Monday, 24 December 2012 10:31:57 UTC-6, [email protected] wrote:
>>>
>>> Hello,
>>> My application performs Ajax calls to dynamically retrieve and display 
>>> the content of a log. If there is no change (no new lines) to the log 
>>> compared to the previous Ajax request, the contoller holds the request for 
>>> up to 5 secs (Ajax long polling).
>>> The problem is that when the controller holds an Ajax request, other 
>>> HTTP requests like click on normal <a href...> links are blocked until the 
>>> Ajax call completes.
>>> Is this due to a limit to the number of requests per client?
>>> Best Regards,
>>> Raphael
>>>
>>

-- 



Reply via email to