taken directly from the book.
*The first argument of the Scheduler class must be the database to be used
by the scheduler to communicate with the workers. This can be the db of the
app or another dedicated db, perhaps one shared by multiple apps. If you
use SQLite it's recommended to use a separate db from the one used by your
app in order to keep the app responsive. *
On Thursday, August 14, 2014 12:43:24 PM UTC+2, peter wrote:
>
> I changed the task to use a flag in a file rather than a flag in the
> database, this seems to stop the worker from hanging. So it would seem that
> one is well advised to avoid using SQLite within the scheduler unless one
> has WAL.
>
> Actually a way that might be safe is to use another database for the
> activity within the scheduler. i.e I use
>
> dba = DAL('sqlite://storagea.sqlite', migrate_enabled=False)
> and
> scheduler = Scheduler(dba, tasks=dict.........
>
> This seems to allow the scheduler to run without problems, so presumably I
> could use the dba database within the scheduler tasks if I do not use it
> outside of the scheduler.
>
> It might be worth mentioning in the book about using an database dedicated
> to the scheduler when using SQLite.
>
> Thanks Niphlod
> Peter
>
>
--
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/d/optout.