WoltLab/WCF — pull request #892 by Gravatronics (2012-11-03 11:57:01+00:00)
Title: Fixes execution of cronjobs

The execution of cronjobs updates the state of the cronjob three times: from ready to pending, from pending to executing and from executing to ready. The problem is that during these updates, the state property of the cronjob object never changes which results in the problem, that during the last update, the cronjob object still believes its state is ready while it actually is executing. Since the last state update want to set the state to ready, the deleted lines stopped that update since the object state is also ready, so according to the deleted lines, there is no need for an update.

As you can see, though the original purpose of these lines might have been a good one (to save database queries), it can result in unexpected behavior that's hard to debug (at least *I* needed some time to resolve this bug … Who would have thought that such a general method like `wcf\data\DatabaseObjectEditor::update()` would cause the problem!?)