I think you need to db.commit() in the task. Does that solve it?

On Sunday, 13 May 2012 21:20:51 UTC-5, Yarin wrote:
>
> I'm using the scheduler and everything is working nicely, except that any 
> calls I make to the db in the task function are ignored- Even though the 
> tasks complete successfully, there's no error, or any indication from the 
> worker that something went wrong. This is happening for both MySQL and 
> SQLite. 
>
> Below is my complete schedule.py file:
> from gluon.scheduler import Scheduler
>
>
> def update_it():
>  row_id = db.test.insert(name='bob') # Nothing will be inserted, and no 
> error will be raised
>  return row_id
>
>
> myscheduler = Scheduler(db, dict(update_it=update_it))
>
> The book doesn't say anything about not being able to use the db. 
>
>

Reply via email to