you should insert a new task if it's "connected" to an event in a 
controller. If you need to queue a recurring task one-time-only and is not 
controlled by some logic in your app, you should insert it using the 
appadmin ....

On Saturday, March 16, 2013 8:16:38 AM UTC+1, Paolo valleri wrote:
>
> Hi Niphlod, 
> I am thinking that I do misunderstood the book because I put  this line
> scheduler.queue_task(test_rest, period=10, repeats=0)
> in a model file, this means that I have re-scheduled my task times and 
> times! 
> Btw, which should be the best place to add a new task (beside using your 
> plugin!)?
>
> Paolo
>
>
> On Friday, March 15, 2013 11:29:26 AM UTC+1, Niphlod wrote:
>>
>> maybe the fact that you're using sqlite :D
>> If you have a recent sqlite distribution activate the WAL, it can zero 
>> out the issues for normal loads (usually also for low loads SQLite ends up 
>> locked)
>> Jokes aside, that's why I implemented multiple queries as regroupings in 
>> python, to alleviate db pressure on "normal" db and to see if sqlite can 
>> cope with it. 
>> Where are you seeing this error? 
>> If you were on the main page, did you try turning the autorefresh off ? 
>> Did you try increasing the cache time ? 
>> and setting GROUPING_MODE to python instead of database ? 
>>
>> PS: you did not used this as a model, right ? it queues a new task at 
>> every request in that case....
>>
>> On Friday, March 15, 2013 11:14:46 AM UTC+1, Paolo valleri wrote:
>>>
>>> Hi, 
>>> I have in plan to use it in a future project, today a started a very 
>>> easy app but I ended up in the error: 'database is locked'.
>>> The tests were done by using sqlite. What is wrong in my app? Please 
>>> find attached the example test
>>> The ticket:
>>>
>>> Traceback (most recent call last):
>>>   File "/home/pvalleri/src/web2py/gluon/restricted.py", line 212, in 
>>> restricted
>>>     exec ccode in environment
>>>   File "/home/pvalleri/src/web2py/applications/scapp/models/scheduler.py" 
>>> <http://127.0.0.1:8000/admin/default/edit/scapp/models/scheduler.py>, line 
>>> 31, in <module>
>>>     scheduler.queue_task(test_rest, period=10, repeats=0)
>>>   File "/home/pvalleri/src/web2py/gluon/scheduler.py", line 959, in 
>>> queue_task
>>>     **kwargs)
>>>   File "/home/pvalleri/src/web2py/gluon/dal.py", line 8460, in 
>>> validate_and_insert
>>>     response.id = self.insert(**new_fields)
>>>   File "/home/pvalleri/src/web2py/gluon/dal.py", line 8443, in insert
>>>     ret =  self._db._adapter.insert(self, self._listify(fields))
>>>   File "/home/pvalleri/src/web2py/gluon/dal.py", line 1201, in insert
>>>     raise e
>>> OperationalError: database is locked
>>>
>>>
>>>
>>> Paolo
>>>
>>> On Thursday, February 28, 2013 10:57:40 PM UTC+1, Niphlod wrote:
>>>>
>>>> plugin just got beta status. 
>>>> I'd gladly take patches for:
>>>> - a nicer layout ?
>>>> - removing all the javascript in template views and consolidate it in a 
>>>> separate js file 
>>>>
>>>> As always, testers are more than welcome. 
>>>
>>>

-- 

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