On Mon, Sep 16, 2013 at 11:32 AM, Aaron Schulz aschulz4587@gmail.comwrote:
Speaking of the job queue, deferred updates are useful for adding jobs that depend on data that was not yet committed. This can easily be an issue since we normally wrap web requests in one DB transaction and commit at the very end. If you push() some jobs before the commit, and they get run before commit (which might randomly happen from time to time), and they depend on some of those DB changes, then the jobs might break. Using deferred updates works around this, as do the transaction callback methods in the Database classes (if you know exactly what DBs things depend on).
Could be worked around if we added a "don't do this job until" functionality to the queue.
-Chad