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:55:34 PM UTC+2, Tushar Tuteja wrote:
>
> 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 <nip...@gmail.com <javascript:>> wrote:
>
>> 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 holding more details about the executions, until you 
>> figure out the issues you're having on what to choose when you queue the 
>> task.
>>
>> Also, please do
>>
>> sched = Scheduler(db, dict(fun=func))
>>
>> sched.queue_task('func', uuid='test_insert', repeats=3, period=10)
>>
>> without any worker running, so you can see what is inserted into the 
>> scheduler_task table correctly.
>> Execute the sched.queue_task just one time only (if you put that in 
>> models, it will be executed at every request and that would be inefficient)
>>
>>
>>  -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/Zs7NODudXSE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Tushar Tuteja
> Undergraduate Student(Fourth Year)
> Civil Engineering
> IIT Delhi
> +919953061943
> ttu...@gmail.com <javascript:>
> ce10...@civil.iitd.ernet.in <javascript:>
> "The question isn't who is going to let me; its who is going to stop me!" 
> - Howard Roark
>  

-- 
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