Are you calling db.commit() to commit your inserts/updates in the database. 
That happens automatically during HTTP requests to your app, but you have 
to do it explicitly in scheduler tasks.

Anthony

On Thursday, December 19, 2013 6:34:02 PM UTC-5, Richard Brown wrote:
>
> I am using the Scheduler to perform some control functions and so have an 
> autonomous function, called by the Scheduler via 'poll.py', in a module 
> called 'utilities.py'. This scans some databases to decide what to 
> do, and this seems to work fine (I have (hopefully) coded around any 
> potential database conflicts).
>
> However, I want to report a value back from my function to display in a 
> View. How should I do this? Ideally I would like to update a database 
> record from my module function which I can interrogate and modify from the 
> view, but nothing I have tried so far seems to find its way back. I use 
> db=current.db in the function, but although this allow the function to get 
> parameters from the database, anything I write back does not modify the 
> actual database available to the View, or in 'Database Administration'.
>
> I have also tried using a session variable but that also appears as 'None' 
> when I read it in the view. The function is not called from anywhere so 
> there is no obvious way of using a return value. 
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to