I have a load component with a grid in it and a user-triggered action that 
could insert/update the database table that my grid's based on.  Depending 
on many factors, the database insert could take a long time, say 45s+.  I 
would like to update the view to show the updating grid while the inserts 
are going on rather than having a stagnant page that looks like it's not 
doing anything for 45s+.  
 
So I created a scheduler and am doing the db inserts in a scheduler task.  
But I'm not sure what the best way is to update the view.  I know that I 
could use the 'times' and 'timeout' parameters in the LOAD.  Or I could 
poll in javascript using setInterval to call web2py_component.  But is it 
burdensome to always have my page updating this, say every second?  The 
scheduler task for my db inserts only happen when the user clicks 
something; at all other times it is unnecessary to reload the grid.  Is 
there a way to make the view constantly update on the user's click but once 
the scheduler task has completed (i.e. finished inserting into the 
database) to stop the view from updating?

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