How do I prevent locking problems with cron jobs?

I have a cron job that goes through a database queue and slowly
processes and deletes each item on the queue. There are webpages that
read and display that queue, and other pages that add to the queue. I
want to prevent the slow cron job from blocking access by these pages.
What can I do?

In other words, can someone explain how the database can get blocked
in this paragraph on the web2py cron page (http://www.web2py.com/
examples/default/cron):

"Be careful how you use models. While the execution happens in a
separate process, database locks have to be taken into account in
order to avoid pages waiting for cron tasks that be blocking the
database. Use the ** syntax if you don't need to use the database in
your cron task."

I need database access in my cron task, and want to avoid these waits.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to