Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
the mail-sending usecase is one of the most clearer to show why a web app might need an "outside processor" to do the work, and keep the webapp snappy. You can choose whatever method you like to schedule the task, all it needs is a record inserted into the scheduler_task table, with correct valu

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
complete the request in a second if I insert in queue. and not a minute* On Thursday 17 October 2013 12:45 AM, Niphlod wrote: the main point is not that is not inefficient by itself. It's just that you need to make sure you don't use that in a model because in web2py models are executed at **ev

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
I got your point. It is that I made the whole project, its running except for sending mails I need to run the mail_queue file manually , I want it to run ever hour or so , so that the mails are being received. so wanted to schedule the sending of mails once every hour and if the load increases ,

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
the main point is not that is not inefficient by itself. It's just that you need to make sure you don't use that in a model because in web2py models are executed at **every** request, and you don't seem to want to queue a task for every request that comes in :-P On Wednesday, October 16, 2013 8

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar Tuteja
thanks a ton, I ll try this and what would be appropriate place to insert the file , so that it is not efficient. thanks, regards, Tushar Tuteja On 17 October 2013 00:22, Niphlod wrote: > the scheduler is running fine. > In the data you pasted here there's the reason why the scheduler isn't

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
the scheduler is running fine. In the data you pasted here there's the reason why the scheduler isn't picking up any new task. times_run is 3 and repeats is set to 3, so the task got executed 3 times already. Sidenote: append a "return 1" to your function, so you'll get scheduler_run records ho

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
I started with that only, but it is still now working. SO I'll tell you what I did. I made a file sched.py *# coding: utf8** **def fun():** **import time** **print 'selecting mails'** **rows = db(db.queue.status=='pending').select()** **for row in rows:** **print 'sending m

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
ok. start it with python web2py.py -K appName -D 0 that sets to DEBUG the logging level Il giorno mercoledì 16 ottobre 2013 14:46:53 UTC+2, Tushar Tuteja ha scritto: > > Ubuntu 12.04 > i use the command > python web2py.py -K appName > > On Wednesday 16 October 2013 05:53 PM, Niphlod wrote: >

Re: [web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Tushar
Ubuntu 12.04 i use the command python web2py.py -K appName On Wednesday 16 October 2013 05:53 PM, Niphlod wrote: a) what ubuntu ? b) how do you start the scheduler ? Il giorno mercoledě 16 ottobre 2013 14:06:41 UTC+2, Tushar Tuteja ha scritto: Hey I am using web2py on ubuntu. I am

[web2py] Re: Scheduler on Ubuntu Worker name

2013-10-16 Thread Niphlod
a) what ubuntu ? b) how do you start the scheduler ? Il giorno mercoledì 16 ottobre 2013 14:06:41 UTC+2, Tushar Tuteja ha scritto: > > Hey I am using web2py on ubuntu. > I am trying to use the scheduler but there is not workers name that is > coming . > and the task is always queued and it nev