Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41900

Log event handler cron failures

    Details

      Description

      In the events_cron() function, if an event handler returns false or null, no more handlers of this type will be called for the duration of the cron. This currently happens silently, which can result in problems remaining undetected and event handler records building up.

      It would be very useful if failing handlers were logged in the cron log.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              maherne Michael Aherne added a comment -

              Here is a patch to allow these messages to be shown when debugging is switched on.

              Show
              maherne Michael Aherne added a comment - Here is a patch to allow these messages to be shown when debugging is switched on.
              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for suggesting this.

              Show
              salvetore Michael de Raadt added a comment - Thanks for suggesting this.
              Hide
              skodak Petr Skoda added a comment -

              makes sense, +1

              Show
              skodak Petr Skoda added a comment - makes sense, +1
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Thanks Michael this has been integrated now.

              Show
              samhemelryk Sam Hemelryk added a comment - Thanks Michael this has been integrated now.
              Hide
              samhemelryk Sam Hemelryk added a comment -

              Gar this caused unit test failures.
              The following should reproduce it:

              vendor/bin/phpunit lib/tests/eventslib_test.php

              I've added a commit to address these so that it doesn't continue failing while we integrate.
              Please Michael/Petr could you review my commit and if not sufficient produce a better solution for me to integrate.

              Many thanks
              Sam

              Show
              samhemelryk Sam Hemelryk added a comment - Gar this caused unit test failures. The following should reproduce it: vendor/bin/phpunit lib/tests/eventslib_test.php I've added a commit to address these so that it doesn't continue failing while we integrate. Please Michael/Petr could you review my commit and if not sufficient produce a better solution for me to integrate. Many thanks Sam
              Hide
              skodak Petr Skoda added a comment -

              Looks ok, it is legacy code anyway, thanks!

              Show
              skodak Petr Skoda added a comment - Looks ok, it is legacy code anyway, thanks!
              Hide
              fred Frédéric Massart added a comment -

              Can I please have some testing instructions for this?

              Show
              fred Frédéric Massart added a comment - Can I please have some testing instructions for this?
              Hide
              fred Frédéric Massart added a comment -

              Passing thanks.

              Show
              fred Frédéric Massart added a comment - Passing thanks.
              Hide
              poltawski Dan Poltawski added a comment -

              You did it!

              Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

              Show
              poltawski Dan Poltawski added a comment - You did it! Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Nov/13