sorry I am not executing the code in the load balancer. Let me say once 
more, so it will be clear.

I dont have any web2py code in the load balancer. 

What I  meant is I have my code in another server(say X) , to which the 
user is redirected by the load balancer(say Y). 

when I execute the webpy application from server X , the index function , 
where my scheduler.queue_task call comes,in the default.py controller will 
not be called as I cant access it from X. That is expected. So what I asked 
was , for breaking down purpose shouldn't I move that call into the 
scheduler.py file in the models folder as the model file will be called.


And I will use the "seperation of duties" approach. but can you just 
confirm that the commands are correct.

On Wednesday, 11 September 2013 21:02:05 UTC+5:30, Niphlod wrote:
>
>
>
>
>> Just a  doubt, 
>>
>> " ok. the scheduler from the console runs right. Now you have to test if 
>> queuing a task from web2py gets the task processed. "
>>
>> Since I am having a load balancer, and the web2py folder is in another 
>> server, when running directly, I believe I will have to queue the task from 
>> the model file itself. Am I correct (as I wont be getting the controller of 
>> the app browser)
>>
>> you can't execute any web2py activity in any server that doesn't have 
> web2py code. The load balancer is NOT the place to open a console or to 
> configure an upstart job. It just load-balance all requests and splits them 
> on one server or the other. That is what load balancers are for. when you 
> reach the loadbalancer address the loadbalancer redirects the requests to 
> the backends, so it is on those servers that the activity takes place.
>  
>
>>
>>  " Then you can do the same thing with the scheduler started by upstart, 
>> and verify that it's working "
>>
>> Which will be the better one, using the command 
>>   exec python -- /srv/trustvouch-fe/web2py.py --nogui -a  -p 8000 -i 
>> 0.0.0.0 -K app -X  
>>
>> or having two upstart jobs (and I am not sure if these are the commands 
>> to start, can you confirm it also)
>>  one to run the app
>>   exec python -- /srv/trustvouch-fe/web2py.py --nogui -a  -p 8000 -i 
>> 0.0.0.0 
>>
>>  and one to start the scheduler
>>  exec python -- /srv/trustvouch-fe/web2py.py  -K app
>>
>>
>>
> definitely the second one, for "separation of duties".
>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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.

Reply via email to