any ideas?
On Dec 2, 6:29 pm, Richard <richar...@gmail.com> wrote: > Hello, > > I have an ongoing background task for processing my database. > I want this task to automatically start when I run my app somewhere > (can assume it is a Linux box), and to restart if it somehow dies. > > This is my current thinking, which I would appreciate feedback on: > - Define a task table, which is checked on every request > - If the task table is empty then start the background task with > subprocess and store the pid in the task table > - If the task table has an entry but its pid is not active (not in / > proc) then restart the background task and update the pid > - Else the task is running fine > > This is a low bandwidth site so efficiency is not important. But the > above strategy seems cumbersome - is there a better way? > > thanks, > Richard -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.