When I tried that, I got the following error when attempting a query:

   ProgrammingError: SQLite objects created in a thread can only be
used in that same thread.

But when I try to create an SQLDB object in my thread, I get:

   OperationalError: unable to open database file

Maybe my thread didn't "instantiate its own connection to the
database"; what does this involve?

Thanks,
Scott

On Oct 8, 5:58 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> It depends on who starts the thread. The main problem is that the web
> server monitors threads and kills them when they take long.
> I principle a model, view controller can start its own thread but you
> should pass a SQLDB object to it. It needs to instantiate its own
> connection to the database and commit or rollback explicitly.
>
> Massimo
>
> On Oct 8, 4:42 pm, Scott Hunter <[EMAIL PROTECTED]> wrote:
>
> > Using the shell command-line option of web2py, one can create a daemon
> > with full access to the DB that the webserver has.  Is it possible to
> > do something similar w/ a thread created within web2py?  When I tried,
> > I got complaints that my db variable wasn't defined; then I tried to
> > include my model file, but got a complaint that it isn't a module.
>
> > Thanks,
> > Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to