Proper way to use transactions in SQL with WAL
I frequently get a Database Locked error when multiple workers access a database of tasks. As the tasks themselves are considerably longer than updating their status, I wrap each update call with a beginTransaction() and a commit().