[web2py] Re: Regarding one Ajax call blocked by another Ajax call

2013-02-04 Thread saransh
Its working after using session.forget(response)

Thank you for your reply. 
On Sunday, February 3, 2013 7:45:15 PM UTC+5:30, Anthony wrote:
>
> By default, the session file is locked upon each request, so a new request 
> from the same client is blocked until the previous request is completed and 
> the session file is unlocked (see 
> here<http://web2py.com/books/default/chapter/29/04#session>). 
> To avoid this problem, you can do one of the following:
>
>- In your app code, when a request for the Ajax function comes in, 
>immediately call session.forget(response).  This will unlock the 
>session file (and therefore prevent the session from being saved for that 
>request). You can include this line at the beginning of the Ajax function 
>itself, or you can include it earlier in a model file:
>
> if request.function in [list, of, ajax, functions]:
> session.forget(response)
>
>- Store sessions in the database or in cookies, in which case there 
>will be no session files to be locked.
>- If you are not using the parameter-based rewrite system, you can use 
>the pattern-based rewrite system to disable automatic session connecting 
>for particular routes. In routes_in, instead of specifying a standard 
>2-tuple, you can specify a 3-tuple. The first two elements of the tuple 
> are 
>as usual (incoming pattern and re-written pattern), and the third element 
>should be dict(web2py_disable_session=True). That will prevent the 
>framework from automatically connecting the session for that route (you 
> can 
>still manually connect the session in your app code). In theory, this is a 
>little more efficient than the first option because it prevents the 
> session 
>file from being locked at all (with the first option, the framework still 
>initially locks the session file, and then your app code unlocks it a bit 
>later).
>
> Anthony
>
> On Sunday, February 3, 2013 2:53:49 AM UTC-5, saransh wrote:
>>
>> Hello,
>>
>> I have a web-app that is running on host A, it runs a few commands on 
>> another host B and i want to display the output of the commands running on 
>> B on a webpage present on A i.e. i want to create a kind of live streaming 
>> of B's console on a webpage present on A. 
>>
>> For this what i did is I redirected the output of B's console to a socket 
>> on A and saved the output in a file on A. 
>>
>> I fire an ajax call that initiates the process(using web2py controller) 
>> to start at B. This ajax call also handles the redirection of B's  console 
>> to A's socket. 
>>
>> From the webpage I fire another ajax that reads the file in which the 
>> data  of the socket is being stored. 
>>
>> Now the problem I am facing is that when I fire the secodn ajax call it 
>> does not returns to the webpage untill the first ajax call is returned.
>>
>> I want to know that is this the correct way of doing this. Also i want to 
>> know that, the problem I am facing is due to ajax or web2py framework?
>>
>> -Saransh
>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Regarding one Ajax call blocked by another Ajax call

2013-02-02 Thread Saransh Gupta
Hello,

I have a web-app that is running on host A, it runs a few commands on
another host B and i want to display the output of the commands running on
B on a webpage present on A i.e. i want to create a kind of live streaming
of B's console on a webpage present on A.

For this what i did is I redirected the output of B's console to a socket
on A and saved the output in a file on A.

I fire an ajax call that initiates the process(using web2py controller) to
start at B. This ajax call also handles the redirection of B's  console to
A's socket.

>From the webpage I fire another ajax that reads the file in which the data
of the socket is being stored.

Now the problem I am facing is that when I fire the secodn ajax call it
does not returns to the webpage untill the first ajax call is returned.

I want to know that is this the correct way of doing this. Also i want to
know that, the problem I am facing is due to ajax or web2py framework?

-Saransh

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: Regarding running web2py.py on ubuntu

2012-12-20 Thread Saransh Gupta
I figured it out.
Thank you.

This application is using pam-auth() for authentication.
I want to used db instead for the authentication process.
I am unable figure out the login workflow.
Please guide me through it or recommend a tutorial if available for the
same.
It will be of great help.


On Fri, Dec 21, 2012 at 12:48 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> when you visit a web page from chrome you can instead the response headers
> and you check which web server is serving pages. Probably you will see
> apache. In this case you should find a reference to web2py in one of the
> apache config file.
>
>
> On Friday, 21 December 2012 00:56:37 UTC-6, saransh wrote:
>
>> I am new to the system.
>> I need to find out how it is running.
>> How can i verify if setup-web2py-ubuntu.sh has been used?
>> Would it be mentioned in apache2 config files?
>>
>>
>> On Fri, Dec 21, 2012 at 12:24 PM, Massimo Di Pierro <
>> massimo@gmail.com> wrote:
>>
>>> Did you use setup-web2py-ubuntu.sh? In that case web2py is running under
>>> apache therefore you will only see the apache processes.
>>>
>>> Massimo
>>>
>>>
>>> On Friday, December 21, 2012 12:37:19 AM UTC-6, saransh wrote:
>>>>
>>>> Hello,
>>>>
>>>> I have a web2py application running on Ubuntu and when i search for the
>>>> processes running i cannot find python web2py.py running.
>>>> Why is this so?
>>>>
>>>> Is there any other way of running web2py on ubuntu other than running
>>>> web2py.py?
>>>>
>>>>
>>>>
>>>>  --
>>>
>>>
>>>
>>>
>>
>>  --
>
>
>
>

-- 





Re: [web2py] Re: Regarding running web2py.py on ubuntu

2012-12-20 Thread Saransh Gupta
I am new to the system.
I need to find out how it is running.
How can i verify if setup-web2py-ubuntu.sh has been used?
Would it be mentioned in apache2 config files?


On Fri, Dec 21, 2012 at 12:24 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Did you use setup-web2py-ubuntu.sh? In that case web2py is running under
> apache therefore you will only see the apache processes.
>
> Massimo
>
>
> On Friday, December 21, 2012 12:37:19 AM UTC-6, saransh wrote:
>>
>> Hello,
>>
>> I have a web2py application running on Ubuntu and when i search for the
>> processes running i cannot find python web2py.py running.
>> Why is this so?
>>
>> Is there any other way of running web2py on ubuntu other than running
>> web2py.py?
>>
>>
>>
>>  --
>
>
>
>

-- 





[web2py] Regarding running web2py.py on ubuntu

2012-12-20 Thread saransh
Hello,

I have a web2py application running on Ubuntu and when i search for the 
processes running i cannot find python web2py.py running.
Why is this so?

Is there any other way of running web2py on ubuntu other than running 
web2py.py?

 

--