[web2py] Re: Scheduler as upstart job

2013-09-17 Thread ajith c t
Hi Niphlod, Got my scheduler working correctly. I updated my web2py version to 2.5.1 from 2.2.1 as you mentioned earlier. After that started two upstart jobs, one for my app and another for the scheduler. Still it returned an error error cleaning up.. I couldn't find an

[web2py] Re: Scheduler as upstart job

2013-09-17 Thread Niphlod
catching those kind of errors is going to be a real PITA... every backend (i.e. database engine) logs the error as it wishes, so we don't have a method for pointing what is going wrong. No logs you reported included error cleaning up: if you told me earlier, I would have pointed you in the

[web2py] Re: Scheduler as upstart job

2013-09-17 Thread ajith c t
I got the error cleaning up message after updating the web2py. I had set user specific permissions, thats what happened. Well its resolved now. Thanks for all the support given by the web2py group. On Tuesday, 17 September 2013 17:50:58 UTC+5:30, Niphlod wrote: catching those kind of errors

[web2py] Re: Scheduler as upstart job

2013-09-12 Thread ajith c t
Thank you for the response, will try everything you said and post it if every thing goes correct On Thursday, 12 September 2013 00:34:31 UTC+5:30, Niphlod wrote: On Wednesday, September 11, 2013 5:44:00 PM UTC+2, ajith c t wrote: sorry I am not executing the code in the load balancer. Let

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
Hi Niphlod, I changed my .conf file a littile by reading the web2py online book, Created a new web2py-scheduler.conf file start on runlevel [2345] stop on runlevel [016] respawn limit 8 60 script exec sudo -u root python

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
what you posted doesn't indicate any issues. The task is there and the worker too. What are you experiencing instead ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
Sorry missed the issue, the issue is the task just doesnt get called up. I believe the scheduler_task will have the worker that picked up the task in the assigned_worker_name field. In my case it remains empty On Wednesday, 11 September 2013 17:45:11 UTC+5:30, Niphlod wrote: what you posted

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
and when you start it without using upstart it works or not ? On Wednesday, September 11, 2013 2:22:32 PM UTC+2, ajith c t wrote: Sorry missed the issue, the issue is the task just doesnt get called up. I believe the scheduler_task will have the worker that picked up the task in the

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
When I start directly from the web2py folder, my load balancer gives me a bad gateway error. When I run the web2py shell , I see the scheduler tables are created. ubuntu@ip-10-0-0-13:/srv/tv-fe$ sudo python web2py.py -K app web2py Web Framework Created by Massimo Di Pierro, Copyright

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
ubuntu@ip-10-0-0-13:/srv/trustvouch-fe$ sudo python web2py.py -K app -D 0 web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2013 Version 2.2.1 (2012-10-21 16:57:04) stable Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(pg8000), IMAP(imaplib) starting

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
let's solve an issue at a time. If your scheduler can't process the tasks that are in the queue when you launch it from the console, something is wrong with it and there's nothing that upstart can fix. If you launch your scheduler from the console with web2py.py -K yourappname -D 0 what is

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
so, the scheduler is working pretty fine: it just doesn't find any task to process. PS: you are on a really old release (2.2.1). That's almost a year ago! On Wednesday, September 11, 2013 4:23:07 PM UTC+2, ajith c t wrote: ubuntu@ip-10-0-0-13:/srv/trustvouch-fe$ sudo python web2py.py -K app

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
Thanks for the support. Yeah I will workout the steps you said one by one and breakdown the problem. 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

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
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

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
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

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread ajith c t
Agreed on the first point. Here the tasks are not getting assigned because I am calling the queue_task from the controller. I believe the controller function 'index' didn't not load as app cannot be opened in the browser. And the second point, yes the web2py version is a bit old, I had a

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
ok. the scheduler from the console runs right. Now you have to test if queuing a task from web2py gets the task processed. Then you can do the same thing with the scheduler started by upstart, and verify that it's working. Next is to verify that you can queue tasks from the web2py web server

[web2py] Re: Scheduler as upstart job

2013-09-11 Thread Niphlod
On Wednesday, September 11, 2013 5:44:00 PM UTC+2, ajith c t wrote: 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

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread Niphlod
why don't you schedule two separate services (the webserver and the scheduler), so the issues will be easier to track down ? what's in the logs ? On Tuesday, September 10, 2013 1:42:11 PM UTC+2, ajith c t wrote: Hi All, I have a scheduler in my app in the models folder with some

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread ajith c t
ok i will try making two separate services. and which log are you checking out, I maintain my custom logging mechanism. The only thing that comes in it is DEBUG - web2py.scheduler - defining tables (migrate=True) the app doesnt assign a worker in the scheduler_task table. The column shows a

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread Niphlod
you may be missing some bits. on production nginx acts as a proxy between uwsgi and the webyou don't need (again, usually) web2py to start its own webserver the -X switch is only useful if you want a single commandline to start BOTH the scheduler and the webserver, and it's meant

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread David
Few suggestions... 1. Try running the job in the foreground. Upstart docs. recommend this wherever its an option.. If you do run the job in the background, be sure you have an expect fork or expect daemon stanza so Upstart can follow the process. 2. When running in the foreground, if you